Fix the duration field for the VideoDetective and InternetVideoArchive tests
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 21 Oct 2013 13:07:33 +0000 (15:07 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 21 Oct 2013 13:07:33 +0000 (15:07 +0200)
Also remove the use of the old format system and the comment

youtube_dl/extractor/internetvideoarchive.py
youtube_dl/extractor/videodetective.py

index 5986459d6dfdf7358b7d7a2e4bc139a579a01265..be8e05f539d7f64c301f7a63a488aedbf9d129cd 100644 (file)
@@ -19,7 +19,7 @@ class InternetVideoArchiveIE(InfoExtractor):
         u'info_dict': {
             u'title': u'SKYFALL',
             u'description': u'In SKYFALL, Bond\'s loyalty to M is tested as her past comes back to haunt her. As MI6 comes under attack, 007 must track down and destroy the threat, no matter how personal the cost.',
-            u'duration': 156,
+            u'duration': 153,
         },
     }
 
@@ -74,7 +74,7 @@ class InternetVideoArchiveIE(InfoExtractor):
             })
         formats = sorted(formats, key=lambda f: f['bitrate'])
 
-        info = {
+        return {
             'id': video_id,
             'title': item.find('title').text,
             'formats': formats,
@@ -82,6 +82,3 @@ class InternetVideoArchiveIE(InfoExtractor):
             'description': item.find('description').text,
             'duration': int(attr['duration']),
         }
-        # TODO: Remove when #980 has been merged
-        info.update(formats[-1])
-        return info
index d89f8409443675f4359b85b96ffc0c2d49ec32e5..265dd5b91fd9e5c4fc5a0cac8a9f36dd36731cfe 100644 (file)
@@ -16,7 +16,7 @@ class VideoDetectiveIE(InfoExtractor):
         u'info_dict': {
             u'title': u'KICK-ASS 2',
             u'description': u'md5:65ba37ad619165afac7d432eaded6013',
-            u'duration': 138,
+            u'duration': 135,
         },
     }