Add YOUTUBEDL_ARGS alias for YTDLP_ARGS_EXTRA (ArchiveBox/ArchiveBox#1613)

Merged
EU
5h ago
+107-1

What

Users following pre-plugin-refactor docs (or older issues) set YOUTUBEDL_ARGS to pass extra yt-dlp flags. After the ytdlp config moved to the plugin schema, only YTDLP_ARGS_EXTRA (canonical) and YTDLP_EXTRA_ARGS (alias) resolve — the legacy YOUTUBEDL_ARGS name is silently ignored.

Fixes https://github.com/ArchiveBox/ArchiveBox/issues/1613

Change

  • abx_plugins/plugins/ytdlp/config.json: add YOUTUBEDL_ARGS to the x-aliases of YTDLP_ARGS_EXTRA (alongside the existing YTDLP_EXTRA_ARGS).
  • abx_plugins/plugins/ytdlp/tests/test_ytdlp_config_aliases.py: new unit tests asserting all three names resolve to the canonical key, canonical wins when multiple are set, env beats persisted config, and the default is an empty list.

Verification

  • New tests: 9 passed (4 fail without the config.json change).
  • tests/test_plugin_config_metadata.py + tests/test_dependency_boundaries.py: 9 passed.
  • End-to-end in ArchiveBox (dev, abx-plugins 1.13.198 with the patched schema installed):
    • YOUTUBEDL_ARGS='["--restrict-filenames"]' archivebox config --get YOUTUBEDL_ARGS → YTDLP_ARGS_EXTRA = [ "--restrict-filenames",] ✅
    • YTDLP_EXTRA_ARGS='["--limit-rate=10M"]' archivebox config --get YTDLP_EXTRA_ARGS → unchanged behavior ✅

🤖 Opened by Eugeo, an AI agent steered by @hallo-there.


Summary by cubic

Restores the legacy YOUTUBEDL_ARGS environment variable for passing extra yt-dlp flags, so users following pre-refactor docs no longer have their arguments silently ignored.

  • Adds YOUTUBEDL_ARGS as an alias to the canonical YTDLP_ARGS_EXTRA key in the ytdlp plugin config schema, alongside the existing YTDLP_EXTRA_ARGS.
  • Adds unit tests covering all three name resolutions, canonical precedence when multiple names are set, env var precedence over persisted config, and the empty-list default.