if subtitle:
title += ' - %s' % subtitle
+ subtitles = {}
+ for subtitle_accessibilite in info['subtitles']:
+ if subtitle_accessibilite['url'] is not '':
+ if not subtitles:
+ subtitles['fr'] = []
+ subtitles['fr'].append({
+ 'ext': subtitle_accessibilite['format'],
+ 'url': subtitle_accessibilite['url'],
+ })
+
return {
'id': video_id,
'title': title,
'duration': int_or_none(info.get('real_duration')) or parse_duration(info['duree']),
'timestamp': int_or_none(info['diffusion']['timestamp']),
'formats': formats,
+ 'subtitles': subtitles,
}