From: Philipp Hagemeister Date: Thu, 11 Jul 2013 10:12:23 +0000 (+0200) Subject: Remove video_result helper method X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=690e872c51646fd99147f33be38fbbb74c91d8fb;p=youtube-dl Remove video_result helper method Calling it was more complex then actually including the type in the video info --- diff --git a/youtube_dl/extractor/archiveorg.py b/youtube_dl/extractor/archiveorg.py index 29cb9bdee..7efd1d823 100644 --- a/youtube_dl/extractor/archiveorg.py +++ b/youtube_dl/extractor/archiveorg.py @@ -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 diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 1d98222ce..1bd5538ca 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -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 diff --git a/youtube_dl/extractor/dreisat.py b/youtube_dl/extractor/dreisat.py index 847f733a7..64b465805 100644 --- a/youtube_dl/extractor/dreisat.py +++ b/youtube_dl/extractor/dreisat.py @@ -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