浏览代码

Do not handle format selection for IEs that already handle it

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

+ 5 - 0
youtube_dl/YoutubeDL.py

@@ -451,6 +451,11 @@ class YoutubeDL(object):
             info_dict['playlist'] = None
             info_dict['playlist'] = None
             info_dict['playlist_index'] = None
             info_dict['playlist_index'] = None
 
 
+        # This extractors handle format selection themselves
+        if info_dict['extractor'] in [u'youtube', u'Youku', u'YouPorn', u'mixcloud']:
+            self.process_info(info_dict)
+            return info_dict
+
         # We now pick which formats have to be downloaded
         # We now pick which formats have to be downloaded
         if info_dict.get('formats') is None:
         if info_dict.get('formats') is None:
             # There's only one format available
             # There's only one format available