mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-24 00:36:52 +01:00
[orf] add subtitles support(closes #10939)
This commit is contained in:
parent
481cc7335c
commit
791d29dbf8
@ -115,12 +115,22 @@ class ORFTVthekIE(InfoExtractor):
|
|||||||
self._check_formats(formats, video_id)
|
self._check_formats(formats, video_id)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
subtitles = {}
|
||||||
|
for sub in sd.get('subtitles', []):
|
||||||
|
sub_src = sub.get('src')
|
||||||
|
if not sub_src:
|
||||||
|
continue
|
||||||
|
subtitles.setdefault(sub.get('lang', 'de-AT'), []).append({
|
||||||
|
'url': sub_src,
|
||||||
|
})
|
||||||
|
|
||||||
upload_date = unified_strdate(sd.get('created_date'))
|
upload_date = unified_strdate(sd.get('created_date'))
|
||||||
entries.append({
|
entries.append({
|
||||||
'_type': 'video',
|
'_type': 'video',
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
'subtitles': subtitles,
|
||||||
'description': sd.get('description'),
|
'description': sd.get('description'),
|
||||||
'duration': int_or_none(sd.get('duration_in_seconds')),
|
'duration': int_or_none(sd.get('duration_in_seconds')),
|
||||||
'upload_date': upload_date,
|
'upload_date': upload_date,
|
||||||
|
Loading…
Reference in New Issue
Block a user