[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:
parent
dca3ff4a5e
commit
f983b87567
61 changed files with 89 additions and 108 deletions
|
|
@ -129,10 +129,6 @@ class ArcPublishingIE(InfoExtractor):
|
|||
if all([f.get('acodec') == 'none' for f in m3u8_formats]):
|
||||
continue
|
||||
for f in m3u8_formats:
|
||||
if f.get('acodec') == 'none':
|
||||
f['preference'] = -40
|
||||
elif f.get('vcodec') == 'none':
|
||||
f['preference'] = -50
|
||||
height = f.get('height')
|
||||
if not height:
|
||||
continue
|
||||
|
|
@ -150,7 +146,7 @@ class ArcPublishingIE(InfoExtractor):
|
|||
'height': int_or_none(s.get('height')),
|
||||
'filesize': int_or_none(s.get('filesize')),
|
||||
'url': s_url,
|
||||
'preference': -1,
|
||||
'quality': -10,
|
||||
})
|
||||
self._sort_formats(formats)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue