handle keyerror on last.fm plugin

+ remove docs sections on pyproject.toml
This commit is contained in:
cwilvx committed 2025-06-07 19:45:53 +03:00
1 parent 85e1405a6c
commit 3bb93aa02d
2 files changed
+5 -9

No files matched your search

+5 -1
View File
@@ -112,7 +112,11 @@ class LastFmPlugin(Plugin):
if res_json["error"] == 9:
log.error("LAST.FM: Invalid session key")
# Invalid session key
self.config.lastfmSessionKeys.pop(str(get_current_userid()))
try:
self.config.lastfmSessionKeys.pop(str(get_current_userid()))
except KeyError:
pass
self.config.lastfmSessionKeys = self.config.lastfmSessionKeys
return False