Save photos locally if Immich API not configured

This commit is contained in:
2025-11-22 19:22:59 -07:00
parent d1852e9cd9
commit 2275774a46
2 changed files with 55 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ class Settings:
"""Return the base URL without a trailing slash for clean joining and display."""
return self.immich_base_url.rstrip("/")
@property
def local_save_only(self) -> bool:
"""True if configured to save locally instead of uploading to Immich."""
return str(self.immich_base_url).lower() == "false"
def load_settings() -> Settings:
"""Load settings from .env, applying defaults when absent."""
# Load environment variables from .env once here so importers dont have to