mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-21 17:05:13 +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:
@@ -44,7 +44,7 @@ class UrortIE(InfoExtractor):
|
||||
'ext': f['FileType'],
|
||||
'format_id': '%s-%s' % (f['FileType'], f.get('Quality', '')),
|
||||
'url': 'http://p3urort.blob.core.windows.net/tracks/%s' % f['FileRef'],
|
||||
'preference': 3 if f['FileType'] == 'mp3' else 2,
|
||||
'quality': 3 if f['FileType'] == 'mp3' else 2,
|
||||
} for f in s['Files']]
|
||||
self._sort_formats(formats)
|
||||
e = {
|
||||
|
||||
Reference in New Issue
Block a user