From ce64f1a42c9570efa75cc2f568e59d683f499bdd Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Fri, 20 Jun 2025 22:32:28 -0500 Subject: config update and more endpoints for api fromtend --- settings.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index f11e930..e6b3df8 100644 --- a/settings.py +++ b/settings.py @@ -2,12 +2,6 @@ from dataclasses import dataclass, asdict, field import json -@dataclass -class AlbumList: - name: str - album_keys: list[str] - - @dataclass class Config: # Immich server @@ -22,11 +16,7 @@ class Config: # Cache max_cache_assets: int = 100 # Albums data - album_lists: list[AlbumList] = field(default_factory=list) - album_list_selected: int = None - - def __post_init__(self): - self.album_lists = [ AlbumList(*a) for a in self.album_lists ] + album_list: list[str] = field(default_factory=list) def __dict__(self): return asdict(self) @@ -39,3 +29,7 @@ class Config: def save(self, filepath): with open(filepath, "w") as fp: json.dump(asdict(self), fp, indent=2) + + def update(self, **config): + for key, value in config.items(): + setattr(self, key, value) -- cgit v1.2.3