projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
884d09f
)
[vimeo] Fix formats' sorting (closes #13189)
author
Sergey M․
<dstftw@gmail.com>
Wed, 24 May 2017 15:58:16 +0000
(22:58 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 24 May 2017 15:58:16 +0000
(22:58 +0700)
youtube_dl/extractor/vimeo.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vimeo.py
b/youtube_dl/extractor/vimeo.py
index 61cc469bf27b58bfc70eb8bd036737ec0a4cb66c..a483c8409ccc8ff469739f1a64e9dbb20c914039 100644
(file)
--- a/
youtube_dl/extractor/vimeo.py
+++ b/
youtube_dl/extractor/vimeo.py
@@
-151,10
+151,16
@@
class VimeoBaseInfoExtractor(InfoExtractor):
else:
mpd_manifest_urls = [(format_id, manifest_url)]
for f_id, m_url in mpd_manifest_urls:
else:
mpd_manifest_urls = [(format_id, manifest_url)]
for f_id, m_url in mpd_manifest_urls:
-
formats.extend(
self._extract_mpd_formats(
+
mpd_formats =
self._extract_mpd_formats(
m_url.replace('/master.json', '/master.mpd'), video_id, f_id,
'Downloading %s MPD information' % cdn_name,
m_url.replace('/master.json', '/master.mpd'), video_id, f_id,
'Downloading %s MPD information' % cdn_name,
- fatal=False))
+ fatal=False)
+ for f in mpd_formats:
+ if f.get('vcodec') == 'none':
+ f['preference'] = -50
+ elif f.get('acodec') == 'none':
+ f['preference'] = -40
+ formats.extend(mpd_formats)
subtitles = {}
text_tracks = config['request'].get('text_tracks')
subtitles = {}
text_tracks = config['request'].get('text_tracks')