YoutubeDLSharp icon indicating copy to clipboard operation
YoutubeDLSharp copied to clipboard

replace-in-metadata doesn't work.

Open nightshadow92 opened this issue 1 year ago • 0 comments

The --replace-in-metadata option requires three values: a field, a regex, and a replacement string, such as --replace-in-metadata "title" "&" "_".

ReplaceInMetadata is passed to yt-dlp as --replace-in-metadata "title '&' '_'".

yt-dlp interprets the entire string as the field name. If it is the last argument, yt-dlp exits with an error, but it can accept the next two arguments as the regex and replacement strings if possible.

For example, doing --replace-in-metadata "title '&' '_'" --sponsorblock-mark "all" results in the sponsorblock being skipped completely.

nightshadow92 avatar Jan 20 '25 15:01 nightshadow92