feat: add isolated utility export modes
This commit is contained in:
@@ -65,6 +65,7 @@ class DownloadConfig:
|
||||
max_height: int = 1080
|
||||
export_directory: Path = Path("exports")
|
||||
export_max_height: int = 1080
|
||||
export_max_workers: int = 1
|
||||
max_queued_exports: int = 20
|
||||
|
||||
|
||||
@@ -186,6 +187,9 @@ def _relative_directory(value: Any, name: str) -> Path:
|
||||
or "\\" in text
|
||||
):
|
||||
raise ConfigError(f"{name} must be a safe relative directory")
|
||||
reserved_roots = {f"slot{slot}" for slot in SLOT_IDS} | {".controller-trash"}
|
||||
if path.parts[0].casefold() in reserved_roots:
|
||||
raise ConfigError(f"{name} must not overlap Controller slot storage")
|
||||
return path
|
||||
|
||||
|
||||
@@ -302,6 +306,11 @@ def load_config(
|
||||
downloads_raw.get("export_max_height", 1080),
|
||||
"downloads.export_max_height",
|
||||
),
|
||||
export_max_workers=_integer(
|
||||
downloads_raw.get("export_max_workers", 1),
|
||||
"downloads.export_max_workers",
|
||||
maximum=10,
|
||||
),
|
||||
max_queued_exports=_integer(
|
||||
downloads_raw.get("max_queued_exports", 20),
|
||||
"downloads.max_queued_exports",
|
||||
|
||||
Reference in New Issue
Block a user