change config bools
This commit is contained in:
@@ -33,8 +33,9 @@ SEQUENCE_EXTENSIONS = {
|
||||
STATE_SUFFIX = ".meta.json"
|
||||
CONFIG_PATH = Path(__file__).resolve().with_name("config.json")
|
||||
DEFAULT_CONFIG = {
|
||||
"zipper": True,
|
||||
"zipper": "7z",
|
||||
"compression": 9,
|
||||
"dailyFormat": "daily_YYMMDD",
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +61,13 @@ def load_config() -> dict:
|
||||
|
||||
|
||||
CONFIG = load_config()
|
||||
USE_7Z = bool(CONFIG.get("zipper", True))
|
||||
zipper_val = CONFIG.get("zipper", "7z")
|
||||
# Handle both old boolean format and new string format
|
||||
if isinstance(zipper_val, bool):
|
||||
ZIPPER_TYPE = "7z" if zipper_val else "zip"
|
||||
else:
|
||||
ZIPPER_TYPE = str(zipper_val).lower()
|
||||
USE_7Z = ZIPPER_TYPE == "7z"
|
||||
COMPRESSION_LEVEL = CONFIG.get("compression", 9)
|
||||
if isinstance(COMPRESSION_LEVEL, str):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user