[outtmpl] Treat empty values as None in filenames

Workaround for #4485
pull/4515/head
pukkandan 2 years ago
parent 4f04be6add
commit a6bcaf71fc
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

@ -1162,6 +1162,9 @@ class YoutubeDL:
if mdict['strf_format']:
value = strftime_or_none(value, mdict['strf_format'].replace('\\,', ','))
# XXX: Workaround for https://github.com/yt-dlp/yt-dlp/issues/4485
if sanitize and value == '':
value = None
return value
na = self.params.get('outtmpl_na_placeholder', 'NA')

Loading…
Cancel
Save