1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-22 22:47:55 +01:00

[YoutubeDL] Skip non-relevant field types when building output template

This commit is contained in:
Sergey M․ 2016-05-02 20:05:06 +06:00
parent df5f4e8888
commit f0e14fdd43
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -580,7 +580,7 @@ class YoutubeDL(object):
is_id=(k == 'id'))
template_dict = dict((k, sanitize(k, v))
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)
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)