Browse Source

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

master
Sergey M․ 8 years ago
parent
commit
f0e14fdd43
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/YoutubeDL.py

2
youtube_dl/YoutubeDL.py

@ -580,7 +580,7 @@ class YoutubeDL(object):
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…
Cancel
Save