pukkandan 3 years ago
parent a1a7907bc0
commit 50fed816dd
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -1363,13 +1363,18 @@ class YoutubeDL(object):
if not isinstance(ie_entries, (list, PagedList)): if not isinstance(ie_entries, (list, PagedList)):
ie_entries = LazyList(ie_entries) ie_entries = LazyList(ie_entries)
def get_entry(i):
return YoutubeDL.__handle_extraction_exceptions(
lambda self, i: ie_entries[i - 1]
)(self, i)
entries = [] entries = []
for i in playlistitems or itertools.count(playliststart): for i in playlistitems or itertools.count(playliststart):
if playlistitems is None and playlistend is not None and playlistend < i: if playlistitems is None and playlistend is not None and playlistend < i:
break break
entry = None entry = None
try: try:
entry = ie_entries[i - 1] entry = get_entry(i)
if entry is None: if entry is None:
raise EntryNotInPlaylist() raise EntryNotInPlaylist()
except (IndexError, EntryNotInPlaylist): except (IndexError, EntryNotInPlaylist):

Loading…
Cancel
Save