1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-09 12:42:28 +01:00

[francetv] Use subtitle when present (Closes #6715)

This commit is contained in:
Sergey M․ 2015-09-01 22:37:42 +06:00
parent 804c343a4f
commit 36c15522c1

View File

@ -78,9 +78,14 @@ def _extract_video(self, video_id, catalogue):
}) })
self._sort_formats(formats) self._sort_formats(formats)
title = info['titre']
subtitle = info.get('sous_titre')
if subtitle:
title += ' - %s' % subtitle
return { return {
'id': video_id, 'id': video_id,
'title': info['titre'], 'title': title,
'description': clean_html(info['synopsis']), 'description': clean_html(info['synopsis']),
'thumbnail': compat_urlparse.urljoin('http://pluzz.francetv.fr', info['image']), 'thumbnail': compat_urlparse.urljoin('http://pluzz.francetv.fr', info['image']),
'duration': int_or_none(info.get('real_duration')) or parse_duration(info['duree']), 'duration': int_or_none(info.get('real_duration')) or parse_duration(info['duree']),