pull/1631/head
pukkandan 3 years ago
parent e08a85d865
commit bf5f605e76
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -1506,9 +1506,9 @@ class YoutubeDL(object):
raise EntryNotInPlaylist('There are no entries') raise EntryNotInPlaylist('There are no entries')
incomplete_entries = bool(ie_result.get('requested_entries')) incomplete_entries = bool(ie_result.get('requested_entries'))
if incomplete_entries: if incomplete_entries:
def fill_missing_entries(entries, indexes): def fill_missing_entries(entries, indices):
ret = [None] * max(*indexes) ret = [None] * max(indices)
for i, entry in zip(indexes, entries): for i, entry in zip(indices, entries):
ret[i - 1] = entry ret[i - 1] = entry
return ret return ret
ie_result['entries'] = fill_missing_entries(ie_result['entries'], ie_result['requested_entries']) ie_result['entries'] = fill_missing_entries(ie_result['entries'], ie_result['requested_entries'])
@ -2991,6 +2991,7 @@ class YoutubeDL(object):
try: try:
self.__download_wrapper(self.process_ie_result)(info, download=True) self.__download_wrapper(self.process_ie_result)(info, download=True)
except (DownloadError, EntryNotInPlaylist, ThrottledDownload) as e: except (DownloadError, EntryNotInPlaylist, ThrottledDownload) as e:
if not isinstance(e, EntryNotInPlaylist):
self.to_stderr('\r') self.to_stderr('\r')
webpage_url = info.get('webpage_url') webpage_url = info.get('webpage_url')
if webpage_url is not None: if webpage_url is not None:

Loading…
Cancel
Save