From 1b64189ac93ff0413f6c94631ac4762b3e36ba8f Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 11 Nov 2023 11:22:00 -0700 Subject: [PATCH] On the final download loop (if we are doing multiple), don't convert any files --- exfiltrate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exfiltrate.py b/exfiltrate.py index 52a8157..3773c90 100644 --- a/exfiltrate.py +++ b/exfiltrate.py @@ -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: