Parameter "playlistonly" makes YoutubeDL skip fetching data for each playlist entry
This commit is contained in:
parent
272ad7045e
commit
cb844616d3
@ -114,6 +114,7 @@ class YoutubeDL(object):
|
|||||||
nooverwrites: Prevent overwriting files.
|
nooverwrites: Prevent overwriting files.
|
||||||
playliststart: Playlist item to start at.
|
playliststart: Playlist item to start at.
|
||||||
playlistend: Playlist item to end at.
|
playlistend: Playlist item to end at.
|
||||||
|
playlistonly: Stops after getting the playlist entries
|
||||||
matchtitle: Download only matching titles.
|
matchtitle: Download only matching titles.
|
||||||
rejecttitle: Reject downloads for matching titles.
|
rejecttitle: Reject downloads for matching titles.
|
||||||
logger: Log messages to a logging.Logger instance.
|
logger: Log messages to a logging.Logger instance.
|
||||||
@ -661,11 +662,13 @@ class YoutubeDL(object):
|
|||||||
self.to_screen('[download] ' + reason)
|
self.to_screen('[download] ' + reason)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not self.params.get('playlistonly', False):
|
||||||
entry_result = self.process_ie_result(entry,
|
entry_result = self.process_ie_result(entry,
|
||||||
download=download,
|
download=download,
|
||||||
extra_info=extra)
|
extra_info=extra)
|
||||||
playlist_results.append(entry_result)
|
playlist_results.append(entry_result)
|
||||||
|
else:
|
||||||
|
playlist_results.append(entry)
|
||||||
|
|
||||||
playlistProgress = {
|
playlistProgress = {
|
||||||
'current': n_entries,
|
'current': n_entries,
|
||||||
@ -678,10 +681,9 @@ class YoutubeDL(object):
|
|||||||
for ph in self._metadata_hooks:
|
for ph in self._metadata_hooks:
|
||||||
ph(playlistProgress)
|
ph(playlistProgress)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ie_result['entries'] = playlist_results
|
ie_result['entries'] = playlist_results
|
||||||
return ie_result
|
return ie_result
|
||||||
|
|
||||||
elif result_type == 'compat_list':
|
elif result_type == 'compat_list':
|
||||||
def _fixup(r):
|
def _fixup(r):
|
||||||
self.add_extra_info(r,
|
self.add_extra_info(r,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user