twitch.tv: Use id as title if no title is present (Closes #638)
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 16 Jan 2013 08:55:45 +0000 (09:55 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 16 Jan 2013 08:55:45 +0000 (09:55 +0100)
youtube_dl/InfoExtractors.py

index 5fbca1c050ff5f8d64c051d4c12ae06a18ac12a6..dcd7ca647c44ee8e1819efd8653949aea708a572 100755 (executable)
@@ -3541,10 +3541,12 @@ class JustinTVIE(InfoExtractor):
                 video_extension = os.path.splitext(video_url)[1][1:]
                 video_date = re.sub('-', '', clip['start_time'][:10])
                 video_uploader_id = clip.get('user_id', clip.get('channel_id'))
+                video_id = clip['id']
+                video_title = clip.get('title', video_id)
                 info.append({
-                    'id': clip['id'],
+                    'id': video_id,
                     'url': video_url,
-                    'title': clip['title'],
+                    'title': video_title,
                     'uploader': clip.get('channel_name', video_uploader_id),
                     'uploader_id': video_uploader_id,
                     'upload_date': video_date,