use playlist_index instead
This commit is contained in:
parent
8c01c473cc
commit
1858c751e7
2 changed files with 4 additions and 4 deletions
|
|
@ -150,9 +150,9 @@ class YoutubeChannelDownloader(YoutubeDownloader[YoutubeChannelDownloaderOptions
|
||||||
url=self.download_options.channel_url,
|
url=self.download_options.channel_url,
|
||||||
)
|
)
|
||||||
self.channel = self._get_channel(entry_dicts=entry_dicts)
|
self.channel = self._get_channel(entry_dicts=entry_dicts)
|
||||||
channel_videos = self._filter_entry_dicts(entry_dicts, sort_by="upload_date")
|
channel_videos = self._filter_entry_dicts(entry_dicts, sort_by="playlist_index")
|
||||||
|
|
||||||
# Iterate in reverse to process older videos first. In case an error occurs and a
|
# Iterate in descending order to process older videos first. In case an error occurs and a
|
||||||
# the channel must be redownloaded, it will fetch most recent metadata first, and break
|
# the channel must be redownloaded, it will fetch most recent metadata first, and break
|
||||||
# on the older video that's been processed and is in the download archive.
|
# on the older video that's been processed and is in the download archive.
|
||||||
for idx, entry_dict in enumerate(reversed(channel_videos), start=1):
|
for idx, entry_dict in enumerate(reversed(channel_videos), start=1):
|
||||||
|
|
|
||||||
|
|
@ -78,11 +78,11 @@ class YoutubePlaylistDownloader(
|
||||||
log_prefix_on_info_json_dl="Downloading metadata for",
|
log_prefix_on_info_json_dl="Downloading metadata for",
|
||||||
url=self.download_options.playlist_url,
|
url=self.download_options.playlist_url,
|
||||||
)
|
)
|
||||||
playlist_videos = self._filter_entry_dicts(entry_dicts, sort_by="upload_date")
|
|
||||||
|
|
||||||
# Iterate in reverse to process older videos first. In case an error occurs and a
|
# Iterate in reverse order to process older videos first. In case an error occurs and a
|
||||||
# the playlist must be redownloaded, it will fetch most recent metadata first, and break
|
# the playlist must be redownloaded, it will fetch most recent metadata first, and break
|
||||||
# on the older video that's been processed and is in the download archive.
|
# on the older video that's been processed and is in the download archive.
|
||||||
|
playlist_videos = self._filter_entry_dicts(entry_dicts, sort_by="playlist_index")
|
||||||
for idx, entry_dict in enumerate(reversed(playlist_videos), start=1):
|
for idx, entry_dict in enumerate(reversed(playlist_videos), start=1):
|
||||||
video = YoutubePlaylistVideo(
|
video = YoutubePlaylistVideo(
|
||||||
entry_dict=entry_dict, working_directory=self.working_directory
|
entry_dict=entry_dict, working_directory=self.working_directory
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue