summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-06-16 21:58:13 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-06-16 21:58:13 -0500
commitc5465f7ceed37f1ba6575248e1035e1430e78921 (patch)
treed8d49d0b716f7188ffe2c27b4ca92361905215d2 /settings.py
parentb8df4605b42d9a61bb4ae4731efabbdc38166063 (diff)
downloadimmich-frame-c5465f7ceed37f1ba6575248e1035e1430e78921.tar.xz
immich-frame-c5465f7ceed37f1ba6575248e1035e1430e78921.zip
config route and fix config saving/creation
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/settings.py b/settings.py
index 43cb024..f11e930 100644
--- a/settings.py
+++ b/settings.py
@@ -28,12 +28,14 @@ class Config:
def __post_init__(self):
self.album_lists = [ AlbumList(*a) for a in self.album_lists ]
+ def __dict__(self):
+ return asdict(self)
+
@classmethod
def load(cls, filepath):
with open(filepath, "r") as fp:
return cls(**json.load(fp))
def save(self, filepath):
- data = asdict(self)
with open(filepath, "w") as fp:
- json.dump(data, fp, indent=2)
+ json.dump(asdict(self), fp, indent=2)