From 2f523ea540f4b7dbdb1f3b0483b219a6e1e7e465 Mon Sep 17 00:00:00 2001 From: lededev Date: Sun, 24 Oct 2021 01:31:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E7=85=A7=E4=B8=8B=E8=BD=BD:=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=AF=8F=E4=B8=AA=E9=94=99=E8=AF=AF,?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=85=A8=E9=83=A8=E6=88=90=E5=8A=9F=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=80=E8=A1=8C=E6=B1=87=E6=80=BB,?= =?UTF-8?q?=E5=A4=A7=E5=B9=85=E7=B2=BE=E7=AE=80=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index c3a488e..0e662d1 100755 --- a/core.py +++ b/core.py @@ -245,10 +245,15 @@ def extrafanart_download_threadpool(url_list, save_dir, number): print('[!]Warrning: Parallel download thread too large may cause website ban IP!') with ThreadPoolExecutor(parallel) as pool: result = list(pool.map(download_one_file, mp_args)) + failed = 0 for i in range(len(result)): - print('[+]Extrafanart Downloaded!', result[i]) if result[i] else print(f'[-]Extrafanart {i+1} for [{number}] download failed!') + if not result[i]: + print(f'[-]Extrafanart {i+1} for [{number}] download failed!') + failed += 1 if not all(result): # 非致命错误,电影不移入失败文件夹,将来可以用模式3补齐 - print('[-]Failed download some extrafanart images for [{number}], you may retry run mode 3 later.') + print(f"[-]Failed downloaded {failed}/{len(result)} extrafanart images for [{number}] to '{extrafanart_dir}', you may retry run mode 3 later.") + else: + print(f"[+]Successfully downloaded {len(result)} extrafanart to '{extrafanart_dir}'") if conf.debug(): print(f'[!]Extrafanart download ThreadPool mode runtime {time.perf_counter() - tm_start:.3f}s')