This commit is contained in:
parent
c60717e069
commit
0890bf01d1
|
@ -185,7 +185,6 @@ if not args.daemon:
|
|||
for i, target_url in tqdm(enumerate(url_list), total=len(url_list), position=0, desc='Inputs', disable=args.daemon):
|
||||
logger.info('Fetching playlist...')
|
||||
playlist = yt_dlp.playlist_contents(target_url)
|
||||
download_queue = playlist['entries']
|
||||
|
||||
log_info_twice(f"Downloading item: '{playlist['title']}' {target_url}")
|
||||
|
||||
|
@ -193,9 +192,10 @@ for i, target_url in tqdm(enumerate(url_list), total=len(url_list), position=0,
|
|||
playlist_bar.set_description(playlist['title'])
|
||||
|
||||
# Remove already downloaded files from the to-do list.
|
||||
for p, video in enumerate(download_queue):
|
||||
if video['id'] in downloaded_videos:
|
||||
del download_queue[p]
|
||||
download_queue = []
|
||||
for p, video in enumerate(playlist['entries']):
|
||||
if video['id'] not in downloaded_videos:
|
||||
download_queue.append(video)
|
||||
playlist_bar.update(len(downloaded_videos))
|
||||
|
||||
if len(download_queue): # Don't mess with multiprocessing if all videos are already downloaded
|
||||
|
|
Reference in New Issue