mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-24 02:15:12 +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:
@@ -133,11 +133,6 @@ class ThreeQSDNIE(InfoExtractor):
|
||||
'vcodec': 'none' if height == 0 else None,
|
||||
'width': width,
|
||||
})
|
||||
for f in formats:
|
||||
if f.get('acodec') == 'none':
|
||||
f['preference'] = -40
|
||||
elif f.get('vcodec') == 'none':
|
||||
f['preference'] = -50
|
||||
# It seems like this would be correctly handled by default
|
||||
# However, unless someone can confirm this, the old
|
||||
# behaviour is being kept as-is
|
||||
|
||||
Reference in New Issue
Block a user