projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70851a9
)
[extractor/common] Fix _media_formats
author
Sergey M․
<dstftw@gmail.com>
Sat, 12 Aug 2017 12:24:26 +0000
(19:24 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 12 Aug 2017 12:24:26 +0000
(19:24 +0700)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index e565901afce0ec6999a478ddf21b0b6745a6a966..7fe888462f0ca2a5e7f5a4096e67885e6f3acf2d 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-2115,7
+2115,7
@@
class InfoExtractor(object):
return f
return {}
return f
return {}
- def _media_formats(src,
type_info, cur_media_type
):
+ def _media_formats(src,
cur_media_type, type_info={}
):
full_url = absolute_url(src)
ext = type_info.get('ext') or determine_ext(full_url)
if ext == 'm3u8':
full_url = absolute_url(src)
ext = type_info.get('ext') or determine_ext(full_url)
if ext == 'm3u8':
@@
-2167,7
+2167,7
@@
class InfoExtractor(object):
if not src:
continue
f = parse_content_type(source_attributes.get('type'))
if not src:
continue
f = parse_content_type(source_attributes.get('type'))
- is_plain_url, formats = _media_formats(src,
f, media_type
)
+ is_plain_url, formats = _media_formats(src,
media_type, f
)
if is_plain_url:
f.update(formats[0])
media_info['formats'].append(f)
if is_plain_url:
f.update(formats[0])
media_info['formats'].append(f)