Save photos locally if Immich API not configured
This commit is contained in:
@@ -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 don’t have to
|
||||
|
||||
Reference in New Issue
Block a user