mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 11:42:43 +01:00
[YoutubeDL] Skip non-relevant field types when building output template
This commit is contained in:
parent
df5f4e8888
commit
f0e14fdd43
@ -580,7 +580,7 @@ def prepare_filename(self, info_dict):
|
|||||||
is_id=(k == 'id'))
|
is_id=(k == 'id'))
|
||||||
template_dict = dict((k, sanitize(k, v))
|
template_dict = dict((k, sanitize(k, v))
|
||||||
for k, v in template_dict.items()
|
for k, v in template_dict.items()
|
||||||
if v is not None)
|
if v is not None and not isinstance(v, (list, tuple, dict)))
|
||||||
template_dict = collections.defaultdict(lambda: 'NA', template_dict)
|
template_dict = collections.defaultdict(lambda: 'NA', template_dict)
|
||||||
|
|
||||||
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
|
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
|
||||||
|
Loading…
Reference in New Issue
Block a user