Moved autoindex to config

This commit is contained in:
2025-09-09 11:22:58 +02:00
parent 132954526d
commit 2bef24770d
2 changed files with 3 additions and 3 deletions

View File

@@ -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")
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")

View File

@@ -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):