Skip to content

Commit

Permalink
[outtmpl] Treat empty values as None in filenames
Browse files Browse the repository at this point in the history
Workaround for yt-dlp#4485
  • Loading branch information
pukkandan committed Jul 30, 2022
1 parent 4f04be6 commit a6bcaf7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit a6bcaf7

Please sign in to comment.