Add configurable title and subtitle v0.6.1

This commit is contained in:
dmo committed 2026-07-23 13:18:19 +02:00
1 parent 47b8d42295
commit c2640cf75a
8 files changed
+34 -9

No files matched your search

+9 -2
View File
@@ -29,8 +29,13 @@ from pillow_heif import register_heif_opener
register_heif_opener()
APP_NAME = os.getenv("APP_NAME", "Photo Date Editor")
APP_TITLE = os.getenv("APP_TITLE") or APP_NAME
APP_SUBTITLE = (
os.getenv("APP_SUBTITLE")
or "Local folder · in-place JPG, PNG, TIFF and HEIF metadata"
)
APP_URL = os.getenv("APP_URL", "http://localhost:8080")
APP_VERSION = "0.6.0"
APP_VERSION = "0.6.1"
MAX_UPLOAD_MB = int(os.getenv("MAX_UPLOAD_MB", "150"))
MAX_UPLOAD_BYTES = MAX_UPLOAD_MB * 1024 * 1024
PREVIEW_MAX_EDGE = int(os.getenv("PREVIEW_MAX_EDGE", "2400"))
@@ -96,7 +101,7 @@ class FavoriteLocationInput(BaseModel):
longitude: float = Field(ge=-180, le=180)
app = FastAPI(title=APP_NAME, docs_url=None, redoc_url=None)
app = FastAPI(title=APP_TITLE, docs_url=None, redoc_url=None)
@app.get("/api/health")
@@ -108,6 +113,8 @@ def health() -> dict[str, str]:
def config() -> dict[str, str | int | float]:
return {
"appName": APP_NAME,
"appTitle": APP_TITLE,
"appSubtitle": APP_SUBTITLE,
"appUrl": APP_URL,
"version": APP_VERSION,
"maxUploadMb": MAX_UPLOAD_MB,