mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-27 11:05:54 +00:00
Remove qualities (redundant with res now, wrong for m3u8 formats)
This commit is contained in:
parent
f1fe8dc8d2
commit
fa2e2f789e
@ -15,7 +15,6 @@ from ..utils import (
|
|||||||
parse_codecs,
|
parse_codecs,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
parse_qs,
|
parse_qs,
|
||||||
qualities,
|
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urljoin,
|
urljoin,
|
||||||
@ -26,7 +25,6 @@ from ..utils.traversal import traverse_obj
|
|||||||
|
|
||||||
class ZDFBaseIE(InfoExtractor):
|
class ZDFBaseIE(InfoExtractor):
|
||||||
_GEO_COUNTRIES = ['DE']
|
_GEO_COUNTRIES = ['DE']
|
||||||
_QUALITIES = ('auto', 'low', 'med', 'high', 'veryhigh', 'hd', 'fhd', 'uhd')
|
|
||||||
|
|
||||||
def _call_api(self, url, video_id, item, api_token=None):
|
def _call_api(self, url, video_id, item, api_token=None):
|
||||||
headers = {'Api-Auth': api_token} if api_token else {}
|
headers = {'Api-Auth': api_token} if api_token else {}
|
||||||
@ -111,17 +109,15 @@ class ZDFBaseIE(InfoExtractor):
|
|||||||
**parse_codecs(quality.get('mimeCodec')),
|
**parse_codecs(quality.get('mimeCodec')),
|
||||||
'height': height,
|
'height': height,
|
||||||
'width': width,
|
'width': width,
|
||||||
'format_id': join_nonempty('http', stream.get('type'), quality.get('quality')),
|
'format_id': join_nonempty('http', stream.get('type')),
|
||||||
'tbr': int_or_none(self._search_regex(r'_(\d+)k_', format_url, 'tbr', default=None)),
|
'tbr': int_or_none(self._search_regex(r'_(\d+)k_', format_url, 'tbr', default=None)),
|
||||||
}]
|
}]
|
||||||
formats.extend(merge_dicts(f, {
|
formats.extend(merge_dicts(f, {
|
||||||
'format_note': join_nonempty(
|
'format_note': join_nonempty(
|
||||||
quality.get('quality'), variant.get('class'),
|
variant.get('class'), 'dgs' if info['dgs'] else '', delim=', '),
|
||||||
'dgs' if info['dgs'] else '', delim=', '),
|
|
||||||
'language': variant.get('language'),
|
'language': variant.get('language'),
|
||||||
'preference': -2 if info['dgs'] else -1,
|
'preference': -2 if info['dgs'] else -1,
|
||||||
'language_preference': 10 if variant.get('class') == 'main' else -10 if variant.get('class') == 'ad' else -1,
|
'language_preference': 10 if variant.get('class') == 'main' else -10 if variant.get('class') == 'ad' else -1,
|
||||||
'quality': qualities(self._QUALITIES)(quality.get('quality')),
|
|
||||||
}) for f in fmts)
|
}) for f in fmts)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user