Moved autoindex to config
This commit is contained in:
@@ -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")
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user