From aff2f4f4f56e15976c539211def26236a4cd55ef Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 20 Nov 2014 12:06:33 +0100 Subject: [arte] Clean up format sorting mess We now use our standard sorting facilities. As a side effect, it's finally possible to download German videos from French URLs and vice versa. --- youtube_dl/extractor/common.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'youtube_dl/extractor/common.py') diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index b77f0e519..7f627c44c 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -87,6 +87,11 @@ class InfoExtractor(object): by this field, regardless of all other values. -1 for default (order by other properties), -2 or smaller for less than default. + * language_preference Is this in the correct requested + language? + 10 if it's what the URL is about, + -1 for default (don't know), + -10 otherwise, other values reserved for now. * quality Order number of the video quality of this format, irrespective of the file format. -1 for default (order by other properties), @@ -615,6 +620,7 @@ class InfoExtractor(object): return ( preference, + f.get('language_preference') if f.get('language_preference') is not None else -1, f.get('quality') if f.get('quality') is not None else -1, f.get('height') if f.get('height') is not None else -1, f.get('width') if f.get('width') is not None else -1, -- cgit v1.2.3