This commit is contained in:
Cyberes 2023-01-21 15:51:23 -07:00
parent 0890bf01d1
commit 6cb86ea08f
No known key found for this signature in database
GPG Key ID: 194A1C358AACFC39
1 changed files with 3 additions and 1 deletions

View File

@ -193,9 +193,11 @@ for i, target_url in tqdm(enumerate(url_list), total=len(url_list), position=0,
# Remove already downloaded files from the to-do list.
download_queue = []
s = set()
for p, video in enumerate(playlist['entries']):
if video['id'] not in downloaded_videos:
if video['id'] not in downloaded_videos or video['id'] not in s:
download_queue.append(video)
s.add(video['id'])
playlist_bar.update(len(downloaded_videos))
if len(download_queue): # Don't mess with multiprocessing if all videos are already downloaded