diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2025-12-22 23:18:41 -0600 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2025-12-22 23:18:41 -0600 |
| commit | 9899db01df87f99164dbe8fdace11bbb22232a80 (patch) | |
| tree | 2d095df965eb3a84f6c1d48ddcdcf93aca25d3f7 | |
| parent | f84408bbd4a4c53dc49589b7735aba905efcc848 (diff) | |
| download | immich-frame-9899db01df87f99164dbe8fdace11bbb22232a80.tar.xz immich-frame-9899db01df87f99164dbe8fdace11bbb22232a80.zip | |
| -rw-r--r-- | src/server/manager.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/server/manager.py b/src/server/manager.py index dfabdd3..8a86edf 100644 --- a/src/server/manager.py +++ b/src/server/manager.py @@ -75,28 +75,30 @@ class PixMan: def update_config(self, config, replace=False): oldconfig = copy.deepcopy(self.config) + if replace: self.config = config else: self.config.update(**config) + if oldconfig.album_list != self.config.album_list: + self.update_textures() + elif oldconfig.order != self.config.order: + self.update_textures() + elif self.config.order == "random": + self.update_textures() + elif self.texture_list: + self.texture_list.max_cache_items = self.config.max_cache_assets + + # Update display config if self.display: self.display.update_config() - if oldconfig.album_list != self.config.album_list: - self.update_textures() - elif oldconfig.order != self.config.order: - self.update_textures() - elif self.config.order == "random" and not replace: # If replace then this would run update_textures() out of order - self.update_textures() - elif self.texture_list: - self.texture_list.max_cache_items = self.config.max_cache_assets - - # If all goes well + # If all above goes well self.config.save(self.configfile) - # Initialize window if immich parameters are valid - if self.config.immich_url and self.config.immich_api_key and not self.display: + # Initialize window if not existing and immich parameters are valid + if not self.display and self.config.immich_url and self.config.immich_api_key: self.init_window() return True |
