handle keyerror on last.fm plugin

+ remove docs sections on pyproject.toml
This commit is contained in:
cwilvx
2025-06-07 19:45:53 +03:00
parent 85e1405a6c
commit 3bb93aa02d
2 changed files with 5 additions and 9 deletions
-8
View File
@@ -63,14 +63,6 @@ dev = [
"pyinstaller==6.12.0",
]
docs = [
"sphinx",
"furo",
"sphinx_design",
"myst_parser",
"sphinx",
"sphinx-autodoc2",
]
[tool.setuptools]
package-dir = {"swingmusic" = "swingmusic"}
+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