fix: slow folder track count

+ etc
This commit is contained in:
cwilvx
2024-06-27 00:02:08 +03:00
parent 54a1b85d8b
commit 1a66194c6c
13 changed files with 183 additions and 95 deletions
+3 -3
View File
@@ -14,13 +14,13 @@ class UserConfig:
# auth stuff
# NOTE: Don't expose the userId via the API
userId: str = ""
serverId: str = ""
usersOnLogin: bool = True
# lists
rootDirs: list[str] = field(default_factory=list)
excludeDirs: list[str] = field(default_factory=list)
artistSeparators: set[str] = field(default_factory=list)
artistSeparators: set[str] = field(default_factory=set)
genreSeparators: set[str] = field(default_factory=lambda: {"/", ";", "&"})
# tracks
@@ -80,7 +80,7 @@ class UserConfig:
settings = {k: v for k, v in settings.items() if not k.startswith("_")}
with open(self._config_path, "w") as f:
json.dump(settings, f, indent=4)
json.dump(settings, f, indent=4, default=list)
def __setattr__(self, key: str, value: Any) -> None:
"""