fix progress bar printed too early

This commit is contained in:
Cyberes 2023-02-02 20:53:18 -07:00
parent 13e91d14af
commit 933ab8301a
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ if args.output:
if args.log_dir:
args.log_dir = resolve_path(args.log_dir)
elif not args.output and not args.log_dir:
print('Must set --logs-dir when --output is not.')
print('Must set --log-dir when --output is not.')
sys.exit(1)
else:
args.log_dir = args.output / 'logs'
@ -237,7 +237,6 @@ for k, v in url_list.items():
url_count += 1
# Init bars
progress_bar = tqdm(total=url_count, position=0, desc='Inputs', disable=args.daemon)
video_bars = manager.list()
if not args.daemon:
for i in range(args.threads):
@ -254,6 +253,7 @@ if not args.daemon:
while True:
do_update()
progress_bar = tqdm(total=url_count, position=0, desc='Inputs', disable=args.daemon)
for output_path, urls in url_list.items():
for target_url in urls:
logger.info('Fetching playlist...')