Remove _sort_formats from _extract_*_formats methods
Now _sort_formats should be called explicitly. _sort_formats has been added to all the necessary places in code. Closes #8051
This commit is contained in:
parent
395fd4b08a
commit
19dbaeece3
29 changed files with 56 additions and 21 deletions
|
@ -1021,8 +1021,6 @@ class InfoExtractor(object):
|
|||
'height': int_or_none(media_el.attrib.get('height')),
|
||||
'preference': preference,
|
||||
})
|
||||
self._sort_formats(formats)
|
||||
|
||||
return formats
|
||||
|
||||
def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None,
|
||||
|
@ -1143,7 +1141,6 @@ class InfoExtractor(object):
|
|||
last_media = None
|
||||
formats.append(f)
|
||||
last_info = {}
|
||||
self._sort_formats(formats)
|
||||
return formats
|
||||
|
||||
@staticmethod
|
||||
|
@ -1317,8 +1314,6 @@ class InfoExtractor(object):
|
|||
})
|
||||
continue
|
||||
|
||||
self._sort_formats(formats)
|
||||
|
||||
return formats
|
||||
|
||||
def _parse_smil_subtitles(self, smil, namespace=None, subtitles_lang='en'):
|
||||
|
@ -1536,7 +1531,6 @@ class InfoExtractor(object):
|
|||
existing_format.update(f)
|
||||
else:
|
||||
self.report_warning('Unknown MIME type %s in DASH manifest' % mime_type)
|
||||
self._sort_formats(formats)
|
||||
return formats
|
||||
|
||||
def _live_title(self, name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue