aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/drtv.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-01-25 21:39:50 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-01-25 21:39:50 +0100
commit71e7da653382b38d8cecde20d60f722417f1cf93 (patch)
tree8218d61b1f77f756ec5d2f487b5f3e0f93dcf543 /youtube_dl/extractor/drtv.py
parentb1b0b1ca3030a2b04dd94ec28d5ece3fda88a282 (diff)
parent80a49d3d7bcd235ba15bd491cc62a0345c9abce1 (diff)
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl/extractor/drtv.py')
-rw-r--r--youtube_dl/extractor/drtv.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/drtv.py b/youtube_dl/extractor/drtv.py
index c44adb109..510ef04b0 100644
--- a/youtube_dl/extractor/drtv.py
+++ b/youtube_dl/extractor/drtv.py
@@ -48,14 +48,20 @@ class DRTVIE(SubtitlesInfoExtractor):
elif asset['Kind'] == 'VideoResource':
duration = asset['DurationInMilliseconds'] / 1000.0
restricted_to_denmark = asset['RestrictedToDenmark']
+ spoken_subtitles = asset['Target'] == 'SpokenSubtitles'
for link in asset['Links']:
target = link['Target']
uri = link['Uri']
+ format_id = target
+ preference = -1 if target == 'HDS' else -2
+ if spoken_subtitles:
+ preference -= 2
+ format_id += '-spoken-subtitles'
formats.append({
'url': uri + '?hdcore=3.3.0&plugin=aasp-3.3.0.99.43' if target == 'HDS' else uri,
- 'format_id': target,
+ 'format_id': format_id,
'ext': link['FileFormat'],
- 'preference': -1 if target == 'HDS' else -2,
+ 'preference': preference,
})
subtitles_list = asset.get('SubtitlesList')
if isinstance(subtitles_list, list):