浏览代码

Fix the default values of format_id and format

Jaime Marquínez Ferrándiz 12 年之前
父节点
当前提交
8016c92297
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      youtube_dl/YoutubeDL.py

+ 2 - 2
youtube_dl/YoutubeDL.py

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