aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-16 00:04:15 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-16 00:04:15 +0700
commiteafaeb226a277008fb8df72bf0326f2b369ff6a5 (patch)
treeee4431b4c1ae7e0b7528b005236c498535ac1202 /youtube_dl
parentde4d378c0cd9035d4ab93dc6826a17c76f388641 (diff)
[ceskatelevize] Lower priority for audio description sources (#12119)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/ceskatelevize.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/youtube_dl/extractor/ceskatelevize.py b/youtube_dl/extractor/ceskatelevize.py
index 1b16e5aaa..b1dfacf80 100644
--- a/youtube_dl/extractor/ceskatelevize.py
+++ b/youtube_dl/extractor/ceskatelevize.py
@@ -159,13 +159,19 @@ class CeskaTelevizeIE(InfoExtractor):
formats = []
for format_id, stream_url in item.get('streamUrls', {}).items():
if 'playerType=flash' in stream_url:
- formats.extend(self._extract_m3u8_formats(
+ stream_formats = self._extract_m3u8_formats(
stream_url, playlist_id, 'mp4',
entry_protocol='m3u8' if is_live else 'm3u8_native',
- m3u8_id='hls', fatal=False))
+ m3u8_id='hls-%s' % format_id, fatal=False)
else:
- formats.extend(self._extract_mpd_formats(
- stream_url, playlist_id, mpd_id='dash', fatal=False))
+ stream_formats = self._extract_mpd_formats(
+ stream_url, playlist_id,
+ mpd_id='dash-%s' % format_id, fatal=False)
+ # See https://github.com/rg3/youtube-dl/issues/12119#issuecomment-280037031
+ if format_id == 'audioDescription':
+ for f in stream_formats:
+ f['source_preference'] = -10
+ formats.extend(stream_formats)
if user_agent and len(entries) == playlist_len:
entries[num]['formats'].extend(formats)