Refactor artistSplitIgnoreList to load from files

+ improving configuration management.
+ Update JSON serialization for sets in settings.
This commit is contained in:
cwilvx
2025-06-09 18:22:39 +03:00
parent 607eed8680
commit 4b600e1c0c
3 changed files with 55 additions and 17 deletions
+7 -1
View File
@@ -95,10 +95,16 @@ def get_all_settings():
Get all settings
"""
config = asdict(UserConfig())
# Convert sets to lists for JSON serialization
for key, value in config.items():
if isinstance(value, set):
config[key] = sorted(list(value))
config["plugins"] = [p for p in PluginTable.get_all()]
config["version"] = Info.SWINGMUSIC_APP_VERSION
# hide lastfmSessionKeys for other users
# only return lastfmSessionKey for the current user
current_user = get_current_userid()
config["lastfmSessionKey"] = config["lastfmSessionKeys"].get(str(current_user), "")
del config["lastfmSessionKeys"]