[francetv] Use subtitle when present (Closes #6715)
authorSergey M․ <dstftw@gmail.com>
Tue, 1 Sep 2015 16:37:42 +0000 (22:37 +0600)
committerSergey M․ <dstftw@gmail.com>
Tue, 1 Sep 2015 16:37:42 +0000 (22:37 +0600)
youtube_dl/extractor/francetv.py

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