From 0e9a90e92afcdf2810e520f2e22a92813d0fc4d8 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Fri, 20 Jan 2023 09:26:32 +0100 Subject: [PATCH] added platform test --- config.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index 990a05b..392eba3 100644 --- a/config.py +++ b/config.py @@ -1,10 +1,14 @@ import os from werkzeug.security import generate_password_hash +from sys import platform #CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/library") #docker -#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/home/drudoo/ComicsTest/Comics") #linux -CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/Comics/ComicRack") #windows -#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "testlibrary") #windows test library + +if platform == "linux" or platform == "linux2": + CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/home/drudoo/ComicsTest/Comics") #linux +elif platform == "win32": + 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')