1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00: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

View File

@ -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')