On the final download loop (if we are doing multiple), don't convert any files

This commit is contained in:
Cyberes 2023-11-11 11:22:00 -07:00
parent ace6f641b6
commit 1b64189ac9
1 changed files with 5 additions and 1 deletions

View File

@ -79,8 +79,12 @@ if __name__ == '__main__':
tiles.append((row, col))
else:
col_bar = tqdm(total=len(col_iter), leave=False)
# On the final download loop (if we are doing multiple), don't convert any files.
do_convert = False if args.convert and 1 < args.download_loops == i else args.convert
with (ThreadPoolExecutor(args.dl_threads) as executor):
futures = [executor.submit(download_tile, (row, col, args.base_url, r_headers, tiles_output, args.proxy, args.convert)) for col in col_iter]
futures = [executor.submit(download_tile, (row, col, args.base_url, r_headers, tiles_output, args.proxy, do_convert)) for col in col_iter]
for future in as_completed(futures):
result = future.result()
if result: