diff --git a/app/config.py b/app/config.py index 6479140..08cbeee 100644 --- a/app/config.py +++ b/app/config.py @@ -21,4 +21,5 @@ if URL_PREFIX == "/": ENABLE_WATCH = _env_bool("ENABLE_WATCH", True) PRECACHE_THUMBS = os.getenv("PRECACHE_THUMBS", "false").strip().lower() not in ("0","false","no","off") THUMB_WORKERS = max(1, int(os.getenv("THUMB_WORKERS", "2"))) -PRECACHE_ON_START = os.getenv("PRECACHE_ON_START", "false").strip().lower() in ("1","true","yes") \ No newline at end of file +PRECACHE_ON_START = os.getenv("PRECACHE_ON_START", "false").strip().lower() in ("1","true","yes") +AUTO_INDEX_ON_START = os.getenv("AUTO_INDEX_ON_START", "false").strip().lower() not in ("0","false","no","off") \ No newline at end of file diff --git a/app/main.py b/app/main.py index 4d0ada5..8c33689 100644 --- a/app/main.py +++ b/app/main.py @@ -21,7 +21,7 @@ import sys import logging from math import ceil -from .config import LIBRARY_DIR, PAGE_SIZE, SERVER_BASE, URL_PREFIX, PRECACHE_THUMBS, THUMB_WORKERS, PRECACHE_ON_START +from .config import LIBRARY_DIR, PAGE_SIZE, SERVER_BASE, URL_PREFIX, PRECACHE_THUMBS, THUMB_WORKERS, PRECACHE_ON_START, AUTO_INDEX_ON_START from .opds import now_rfc3339, mime_for from .auth import require_basic from .thumbs import have_thumb, generate_thumb @@ -94,7 +94,6 @@ _INDEX_STATUS = { "ended_at": 0.0, } _INDEX_LOCK = threading.Lock() -AUTO_INDEX_ON_START = os.getenv("AUTO_INDEX_ON_START", "false").strip().lower() not in ("0","false","no","off") # -------------------- Small helpers -------------------- def rget(row, key: str, default=None):