mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-07-27 13:54:14 +09:00
Changed method playlist_result
to use **kwargs
instead of acquiring a potentially unlimited argument list
This commit is contained in:
parent
b06cff2ba1
commit
ac6d433c80
@ -968,21 +968,11 @@ class InfoExtractor(object):
|
||||
urls, playlist_id=playlist_id, playlist_title=playlist_title)
|
||||
|
||||
@staticmethod
|
||||
def playlist_result(entries, playlist_id=None, playlist_title=None, playlist_description=None,
|
||||
playlist_view_count=None, playlist_last_update=None):
|
||||
def playlist_result(entries, **kwargs):
|
||||
"""Returns a playlist"""
|
||||
video_info = {'_type': 'playlist',
|
||||
'entries': entries}
|
||||
if playlist_id:
|
||||
video_info['id'] = playlist_id
|
||||
if playlist_title:
|
||||
video_info['title'] = playlist_title
|
||||
if playlist_description:
|
||||
video_info['description'] = playlist_description
|
||||
if playlist_view_count:
|
||||
video_info['view_count'] = playlist_view_count
|
||||
if playlist_last_update:
|
||||
video_info['last_updated'] = playlist_last_update
|
||||
'entries': entries,
|
||||
**kwargs}
|
||||
return video_info
|
||||
|
||||
def _search_regex(self, pattern, string, name, default=NO_DEFAULT, fatal=True, flags=0, group=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user