projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f9529c
)
[youtube] Handle cases where format comes without a preference (Fixes #4648)
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 5 Jan 2015 21:42:17 +0000
(22:42 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 5 Jan 2015 21:42:17 +0000
(22:42 +0100)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index d1bbf0b01ae7ccb7c67bb468a904b9659e6fd14b..4aa8615b44929d4d195acaed7e18948495235848 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-1046,7
+1046,7
@@
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
for f in formats:
if f['format_id'] in dash_keys:
f['format_id'] = 'nondash-%s' % f['format_id']
- f['preference']
-=
10000
+ f['preference']
= f.get('preference', 0) -
10000
formats.extend(dash_formats)
self._sort_formats(formats)