[utils] Add `video_title` for `url_result`
authorSergey M․ <dstftw@gmail.com>
Sun, 12 Apr 2015 17:11:47 +0000 (23:11 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 12 Apr 2015 17:11:47 +0000 (23:11 +0600)
youtube_dl/extractor/common.py

index 530c449c1b48e48d0f8fcf4e7223bff9d60138b1..8ed97f8dddfc5d9b51dab2630008c36e054a50bf 100644 (file)
@@ -492,7 +492,7 @@ class InfoExtractor(object):
 
     # Methods for following #608
     @staticmethod
-    def url_result(url, ie=None, video_id=None):
+    def url_result(url, ie=None, video_id=None, video_title=None):
         """Returns a url that points to a page that should be processed"""
         # TODO: ie should be the class used for getting the info
         video_info = {'_type': 'url',
@@ -500,6 +500,8 @@ class InfoExtractor(object):
                       'ie_key': ie}
         if video_id is not None:
             video_info['id'] = video_id
+        if video_title is not None:
+            video_info['title'] = video_title
         return video_info
 
     @staticmethod