1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[extractor] Deprecate _sort_formats

This commit is contained in:
pukkandan
2022-11-17 10:40:03 +05:30
parent 784320c98c
commit 9f14daf22b
579 changed files with 69 additions and 918 deletions

View File

@ -117,13 +117,10 @@ class ParliamentLiveUKIE(RedBeeBaseIE):
video_id = self._match_id(url)
formats, subtitles = self._get_formats_and_subtitles(video_id)
self._sort_formats(formats)
video_info = self._download_json(
f'https://www.parliamentlive.tv/Event/GetShareVideo/{video_id}', video_id, fatal=False)
self._sort_formats(formats, ['res', 'proto'])
return {
'id': video_id,
'formats': formats,
@ -132,6 +129,7 @@ class ParliamentLiveUKIE(RedBeeBaseIE):
'thumbnail': traverse_obj(video_info, 'thumbnailUrl'),
'timestamp': traverse_obj(
video_info, ('event', 'publishedStartTime'), expected_type=unified_timestamp),
'_format_sort_fields': ('res', 'proto'),
}
@ -366,7 +364,6 @@ class RTBFIE(RedBeeBaseIE):
formats.extend(fmts)
self._merge_subtitles(subs, target=subtitles)
self._sort_formats(formats, ['res', 'proto'])
return {
'id': media_id,
'formats': formats,
@ -378,4 +375,5 @@ class RTBFIE(RedBeeBaseIE):
'series': data.get('programLabel'),
'subtitles': subtitles,
'is_live': is_live,
'_format_sort_fields': ('res', 'proto'),
}