ComicOPDS/config.py

30 lines
873 B
Python
Raw Normal View History

2022-06-07 09:16:43 +02:00
import os
from werkzeug.security import generate_password_hash
2023-01-17 16:17:22 +01:00
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/library") #docker
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/home/drudoo/ComicsTest/Comics") #linux
2023-01-19 22:33:11 +01:00
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/Comics/ComicRack") #windows
CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "testlibrary") #windows test library
THUMBNAIL_DIR = os.getenv("THUMBNAIL_DIR",'thumbnails')
2023-01-19 15:41:27 +01:00
WIN_DRIVE_LETTER = 'B'
DEFAULT_SEARCH_NUMBER = 10
2023-01-17 16:17:22 +01:00
DEBUG = True
def _print(arg):
if DEBUG:
print(arg)
2022-06-07 09:16:43 +02:00
TEENYOPDS_ADMIN_PASSWORD = os.getenv("TEENYOPDS_ADMIN_PASSWORD", None)
users = {}
if TEENYOPDS_ADMIN_PASSWORD:
users = {
"admin": generate_password_hash(TEENYOPDS_ADMIN_PASSWORD),
}
else:
print(
"WANRNING: admin password not configured - catalog will be exposed was public"
)