[YoutubeDL] Skip non-relevant field types when building output template
authorSergey M․ <dstftw@gmail.com>
Mon, 2 May 2016 14:05:06 +0000 (20:05 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 2 May 2016 14:05:06 +0000 (20:05 +0600)
youtube_dl/YoutubeDL.py

index 4e57c96873498bef4a360ea603d46ef0f5caaad5..2187dcc8f6b850707e5d024fd94427cdc21fe536 100755 (executable)
@@ -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)