From c5465f7ceed37f1ba6575248e1035e1430e78921 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 16 Jun 2025 21:58:13 -0500 Subject: config route and fix config saving/creation --- settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'settings.py') 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) -- cgit v1.2.3