- entries = ie_result['entries'][playliststart:playlistend]
- n_entries = len(entries)
-
- self.to_screen(
- "[%s] playlist '%s': Collected %d video ids (downloading %d of them)" %
- (ie_result['extractor'], playlist, n_all_entries, n_entries))
+ if isinstance(ie_result['entries'], list):
+ n_all_entries = len(ie_result['entries'])
+ entries = ie_result['entries'][playliststart:playlistend]
+ n_entries = len(entries)
+ self.to_screen(
+ "[%s] playlist %s: Collected %d video ids (downloading %d of them)" %
+ (ie_result['extractor'], playlist, n_all_entries, n_entries))
+ else:
+ assert isinstance(ie_result['entries'], PagedList)
+ entries = ie_result['entries'].getslice(
+ playliststart, playlistend)
+ n_entries = len(entries)
+ self.to_screen(
+ "[%s] playlist %s: Downloading %d videos" %
+ (ie_result['extractor'], playlist, n_entries))