1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-25 10:55:14 +00:00

[formatsort] Remove misuse of 'preference'

'preference' is to be used only when the format is better that ALL qualities of a lower preference irrespective of ANY sorting order the user requests. See deezer.py for correct use of this

In the older sorting method, `preference`, `quality` and `language_preference` were functionally almost equivalent. So these disparities doesn't really matter there

Also, despite what the documentation says, the default for `preference` was actually 0 and not -1. I have tried to correct this and also account for it when converting `preference` to `quality`
This commit is contained in:
pukkandan
2021-02-19 03:33:16 +05:30
parent dca3ff4a5e
commit f983b87567
61 changed files with 89 additions and 108 deletions

View File

@@ -78,7 +78,7 @@ class PicartoIE(InfoExtractor):
update_url_query(
'https://%s/hls/%s/index.m3u8'
% (edge_ep, channel_id), params),
channel_id, 'mp4', preference=preference,
channel_id, 'mp4', quality=preference,
m3u8_id='-'.join(format_id), fatal=False))
continue
elif tech_type == 'video/mp4' or tech_label == 'MP4':
@@ -88,7 +88,7 @@ class PicartoIE(InfoExtractor):
'https://%s/mp4/%s.mp4' % (edge_ep, channel_id),
params),
'format_id': '-'.join(format_id),
'preference': preference,
'quality': preference,
})
else:
# rtmp format does not seem to work