Skip to content

allowlist replace_in_metadata in yt_dlp_opts#20

Merged
loganbuilt merged 2 commits into
sudoStacks:mainfrom
bradleesand:add-replace-in-metadata-allowlist
Jun 7, 2026
Merged

allowlist replace_in_metadata in yt_dlp_opts#20
loganbuilt merged 2 commits into
sudoStacks:mainfrom
bradleesand:add-replace-in-metadata-allowlist

Conversation

@bradleesand

Copy link
Copy Markdown
Contributor

What

Adds replace_in_metadata to _YTDLP_DOWNLOAD_ALLOWLIST so it can be passed via yt_dlp_opts in config.

Why

replace_in_metadata is a yt-dlp post-processor option that rewrites metadata fields using regex substitution (e.g. stripping remaster suffixes or channel name suffixes from titles). It doesn't affect the download itself — it only transforms metadata — so it's safe to allowlist alongside options like ratelimit and retries.

Without this, users who set replace_in_metadata in yt_dlp_opts have it silently dropped.

Test

Added a test to tests/test_ytdlp_download_opts.py verifying the option passes through build_ytdlp_opts for download operations.

@loganbuilt

Copy link
Copy Markdown
Collaborator

@bradleesand can you change this to merge into arr_integration branch? I'm about to release v1.0.0 from that branch and I do think this PR can go there cleanly! thanks

replace_in_metadata is a yt-dlp post-processor option that rewrites
metadata fields using regex substitution. It's useful for stripping
noise from titles (e.g. remaster suffixes, channel name suffixes)
without affecting the download itself, making it safe to allowlist.
The music-search-benchmark workflow requires CHANGELOG.md to be
updated for any change that touches engine/job_queue.py.
@bradleesand
bradleesand force-pushed the add-replace-in-metadata-allowlist branch from 783c17e to 64ca860 Compare June 6, 2026 19:54
@bradleesand

Copy link
Copy Markdown
Contributor Author

Sorry I missed the v1.0.0 release, the past two weeks have been extra busy for me. Congrats on shipping 1.0.0!

Rebased onto current main. Since arr_integration was merged into main as part of the release, I kept the base as main rather than retargeting — the change applies cleanly there. The only conflict was in CHANGELOG.md (release churn), now resolved with the note under a fresh ## Unreleased section at the top. The functional change is unchanged: replace_in_metadata added to _YTDLP_DOWNLOAD_ALLOWLIST, plus the passthrough test. pytest tests/test_ytdlp_download_opts.py passes (9/9).

@loganbuilt
loganbuilt merged commit a2c1619 into sudoStacks:main Jun 7, 2026
1 check passed
@loganbuilt

Copy link
Copy Markdown
Collaborator

thank you!
I've been working on this for a while now. I've got alot of work to do on Music still. I'm interested in hearing your thoughts on where the project is at now. my email is listed on my profile page, if you want to get in touch with me, feel free! Good to have someone else jumping in on the project. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants