[extractor/common] Add description to playlist_result
authorSergey M․ <dstftw@gmail.com>
Sat, 6 Dec 2014 19:46:30 +0000 (01:46 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 6 Dec 2014 19:46:30 +0000 (01:46 +0600)
youtube_dl/extractor/common.py

index cb6081dd08ef13ce073f4af030e8c3cc40dd7f8d..2faaf6226600182abba37efc2eccd67be6e5ef03 100644 (file)
@@ -439,7 +439,7 @@ class InfoExtractor(object):
         return video_info
 
     @staticmethod
-    def playlist_result(entries, playlist_id=None, playlist_title=None):
+    def playlist_result(entries, playlist_id=None, playlist_title=None, playlist_description=None):
         """Returns a playlist"""
         video_info = {'_type': 'playlist',
                       'entries': entries}
@@ -447,6 +447,8 @@ class InfoExtractor(object):
             video_info['id'] = playlist_id
         if playlist_title:
             video_info['title'] = playlist_title
+        if playlist_description:
+            video_info['description'] = playlist_description
         return video_info
 
     def _search_regex(self, pattern, string, name, default=_NO_DEFAULT, fatal=True, flags=0, group=None):