1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-07-08 21:04:38 +02:00

[outtmpl] Treat empty values as None in filenames

Workaround for #4485
This commit is contained in:
pukkandan 2022-07-31 03:19:50 +05:30
parent 4f04be6add
commit a6bcaf71fc
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -1162,6 +1162,9 @@ def get_value(mdict):
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')