Fix the default values of format_id and format
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 14 Jul 2013 15:31:52 +0000 (17:31 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 11 Oct 2013 14:34:49 +0000 (16:34 +0200)
youtube_dl/YoutubeDL.py

index e159aa336dcae85e3422d59930d4938d3863f875..a32e50772642adc046d6614577b8533584bf3745 100644 (file)
@@ -472,10 +472,10 @@ class YoutubeDL(object):
                     else:
                         format_desc = u'%sp' % format['height']
                 else:
-                    format_desc = compat_str(i)
+                    format_desc = '???'
                 format['format'] = format_desc
             if format.get('format_id') is None:
-                format['format_id'] = '???'
+                format['format_id'] = compat_str(i)
 
         if self.params.get('listformats', None):
             self.list_formats(info_dict)