mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-04 06:47:57 +10:00
- Move hardcoded default args from Python to config.json YTDLP_ARGS - Add get_ytdlp_args() function to read from YTDLP_ARGS env var - Keep format arg with max_size in code (depends on YTDLP_MAX_SIZE) - YTDLP_ARGS can be overridden as JSON array in environment
72 lines
2.1 KiB
JSON
72 lines
2.1 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"YTDLP_ENABLED": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"x-aliases": ["MEDIA_ENABLED", "SAVE_MEDIA", "USE_MEDIA", "USE_YTDLP", "FETCH_MEDIA", "SAVE_YTDLP"],
|
|
"description": "Enable video/audio downloading with yt-dlp"
|
|
},
|
|
"YTDLP_BINARY": {
|
|
"type": "string",
|
|
"default": "yt-dlp",
|
|
"x-aliases": ["MEDIA_BINARY", "YOUTUBEDL_BINARY", "YOUTUBE_DL_BINARY"],
|
|
"description": "Path to yt-dlp binary"
|
|
},
|
|
"YTDLP_TIMEOUT": {
|
|
"type": "integer",
|
|
"default": 3600,
|
|
"minimum": 30,
|
|
"x-fallback": "TIMEOUT",
|
|
"x-aliases": ["MEDIA_TIMEOUT"],
|
|
"description": "Timeout for yt-dlp downloads in seconds"
|
|
},
|
|
"YTDLP_MAX_SIZE": {
|
|
"type": "string",
|
|
"default": "750m",
|
|
"pattern": "^\\d+[kmgKMG]?$",
|
|
"x-aliases": ["MEDIA_MAX_SIZE"],
|
|
"description": "Maximum file size for yt-dlp downloads"
|
|
},
|
|
"YTDLP_CHECK_SSL_VALIDITY": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"x-fallback": "CHECK_SSL_VALIDITY",
|
|
"x-aliases": ["MEDIA_CHECK_SSL_VALIDITY"],
|
|
"description": "Whether to verify SSL certificates"
|
|
},
|
|
"YTDLP_ARGS": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"default": [
|
|
"--restrict-filenames",
|
|
"--trim-filenames", "128",
|
|
"--write-description",
|
|
"--write-info-json",
|
|
"--write-thumbnail",
|
|
"--write-sub",
|
|
"--write-auto-subs",
|
|
"--convert-subs=srt",
|
|
"--yes-playlist",
|
|
"--continue",
|
|
"--no-abort-on-error",
|
|
"--ignore-errors",
|
|
"--geo-bypass",
|
|
"--add-metadata",
|
|
"--no-progress",
|
|
"-o", "%(title)s.%(ext)s"
|
|
],
|
|
"x-aliases": ["MEDIA_ARGS"],
|
|
"description": "Default yt-dlp arguments (override to customize behavior)"
|
|
},
|
|
"YTDLP_EXTRA_ARGS": {
|
|
"type": "string",
|
|
"default": "",
|
|
"x-aliases": ["MEDIA_EXTRA_ARGS"],
|
|
"description": "Extra arguments for yt-dlp (space-separated, appended after YTDLP_ARGS)"
|
|
}
|
|
}
|
|
}
|