aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-07-31 03:19:50 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-07-31 03:26:09 +0530
commita6bcaf71fc94b2f301d4253ecea87ea2ff76fedb (patch)
tree5677085daed6950124bcb04058ca475ec8383875 /yt_dlp/YoutubeDL.py
parent4f04be6add6133d103b4c671cec02128a8a0f16e (diff)
downloadhypervideo-pre-a6bcaf71fc94b2f301d4253ecea87ea2ff76fedb.tar.lz
hypervideo-pre-a6bcaf71fc94b2f301d4253ecea87ea2ff76fedb.tar.xz
hypervideo-pre-a6bcaf71fc94b2f301d4253ecea87ea2ff76fedb.zip
[outtmpl] Treat empty values as None in filenames
Workaround for #4485
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index e9a51cba4..ce8ac2e89 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -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')