Use a set of audio-only extensions

This commit is contained in:
tcely 2025-04-08 20:10:55 -04:00 committed by GitHub
parent 55f55e7305
commit e394232b15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -302,7 +302,12 @@ def download_media(
).options.sponsorblock_mark
pp_opts.sponsorblock_remove.update(sponsor_categories or {})
if Val(FileExtension.OGG) == extension:
# Enable audio extraction for audio-only extensions
audio_exts = {
Val(FileExtension.M4A),
Val(FileExtension.OGG),
}
if extension in audio_exts:
pp_opts.extractaudio = True
pp_opts.nopostoverwrites = False