Merge pull request #221 from exislow/197-bug-both-cli-and-gui-app-crashes-with-jsondecodeerror-expecting-value-line-1-column-1-char-0
If login fails `token.json` will be removed, so the user can have a f…
This commit is contained in:
@@ -125,8 +125,16 @@ class Tidal(BaseConfig, metaclass=SingletonMeta):
|
|||||||
self.data.expiry_time,
|
self.data.expiry_time,
|
||||||
is_pkce=do_pkce,
|
is_pkce=do_pkce,
|
||||||
)
|
)
|
||||||
except HTTPError:
|
except (HTTPError, JSONDecodeError):
|
||||||
result = False
|
result = False
|
||||||
|
# Remove token file. Probably corrupt or invalid.
|
||||||
|
if os.path.exists(self.file_path):
|
||||||
|
os.remove(self.file_path)
|
||||||
|
|
||||||
|
print(
|
||||||
|
"Either there is something wrong with your credentials / account or some server problems on TIDALs "
|
||||||
|
"side. Anyway... Try to login again by re-starting this app."
|
||||||
|
)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user