Remove video_result helper method
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 11 Jul 2013 10:12:23 +0000 (12:12 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 11 Jul 2013 10:12:30 +0000 (12:12 +0200)
Calling it was more complex then actually including the type in the video info

youtube_dl/extractor/archiveorg.py
youtube_dl/extractor/common.py
youtube_dl/extractor/dreisat.py

index 29cb9bdee1e032fc6c316a4b6806a22f55ffb662..7efd1d82324c5397bb6d6f10e1bfa993a2531584 100644 (file)
@@ -48,6 +48,7 @@ class ArchiveOrgIE(InfoExtractor):
         formats.sort(key=lambda fdata: fdata['file_size'])
 
         info = {
+            '_type': 'video',
             'id': video_id,
             'title': title,
             'formats': formats,
@@ -63,4 +64,4 @@ class ArchiveOrgIE(InfoExtractor):
         info['url'] = formats[-1]['url']
         info['ext'] = determine_ext(formats[-1]['url'])
 
-        return self.video_result(info)
\ No newline at end of file
+        return info
\ No newline at end of file
index 1d98222ce6518398fd2a1381100400d5bacb99c0..1bd5538ca2af7f2f8772b9e10eb9508588143258 100644 (file)
@@ -169,11 +169,6 @@ class InfoExtractor(object):
         self.to_screen(u'Logging in')
 
     #Methods for following #608
-    #They set the correct value of the '_type' key
-    def video_result(self, video_info):
-        """Returns a video"""
-        video_info['_type'] = 'video'
-        return video_info
     def url_result(self, url, ie=None):
         """Returns a url that points to a page that should be processed"""
         #TODO: ie should be the class used for getting the info
index 847f733a78e44a423a7bfa8be3409f3fe01c9365..64b4658053cd98d0313071dccc05548384098ae7 100644 (file)
@@ -67,6 +67,7 @@ class DreiSatIE(InfoExtractor):
         formats.sort(key=_sortkey)
 
         info = {
+            '_type': 'video',
             'id': video_id,
             'title': video_title,
             'formats': formats,
@@ -81,4 +82,4 @@ class DreiSatIE(InfoExtractor):
         info['url'] = formats[-1]['url']
         info['ext'] = determine_ext(formats[-1]['url'])
 
-        return self.video_result(info)
\ No newline at end of file
+        return info
\ No newline at end of file