added check if logged in functions to anilist and simkl
This commit is contained in:
@ -25,8 +25,16 @@ var aniRing, _ = keyring.Open(keyring.Config{
|
||||
|
||||
var aniCtxShutdown, aniCancel = context.WithCancel(context.Background())
|
||||
|
||||
func (a *App) CheckIfAniListLoggedIn() bool {
|
||||
if (AniListJWT{} == aniListJwt) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) AniListLogin() {
|
||||
if (AniListJWT{}) == aniListJwt {
|
||||
if a.CheckIfSimklLoggedIn() == false {
|
||||
tokenType, err := aniRing.Get("anilistTokenType")
|
||||
expiresIn, err := aniRing.Get("anilistTokenExpiresIn")
|
||||
accessToken, err := aniRing.Get("anilistAccessToken")
|
||||
|
Reference in New Issue
Block a user