summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-06-20 22:32:28 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-06-20 22:32:28 -0500
commitce64f1a42c9570efa75cc2f568e59d683f499bdd (patch)
tree03563a0ce3ce666f465989044120797e5170ff6f /settings.py
parentc9e7eb40fc5f408cc4177763fd4e82a3632388a1 (diff)
downloadimmich-frame-ce64f1a42c9570efa75cc2f568e59d683f499bdd.tar.xz
immich-frame-ce64f1a42c9570efa75cc2f568e59d683f499bdd.zip
config update and more endpoints for api fromtend
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/settings.py b/settings.py
index f11e930..e6b3df8 100644
--- a/settings.py
+++ b/settings.py
@@ -3,12 +3,6 @@ import json
@dataclass
-class AlbumList:
- name: str
- album_keys: list[str]
-
-
-@dataclass
class Config:
# Immich server
immich_url: str = ""
@@ -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)