[O] Avoid hardcoding dirs

This commit is contained in:
2026-03-10 16:01:36 -04:00
parent eec5531c3d
commit 89735102cb
3 changed files with 13 additions and 5 deletions
+5
View File
@@ -1,8 +1,13 @@
import json
import hashlib
import tomllib
from pathlib import Path
from functools import wraps
config = tomllib.loads(Path("config.toml").read_text(encoding="utf-8"))
DEFAULT_DL_DIR = config["paths"]["qb_download_dir"]
DEFAULT_JELLYFIN_DIR = config["paths"]["jellyfin_dir"]
def _disk_cache_decorator(subdir_name: str, ext: str, read_func, write_func, should_cache = None):
"""
Generic internal caching decorator handling filename hashing and io abstraction.