From 1294ab9559a872f5c66211190f7e4ef3f6709df1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 20 Apr 2020 00:42:47 +0200 Subject: Fail manga download if no images are found for chapter --- plugins/mangawindow.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/mangawindow.py') diff --git a/plugins/mangawindow.py b/plugins/mangawindow.py index 10f0f88..0b63c2d 100755 --- a/plugins/mangawindow.py +++ b/plugins/mangawindow.py @@ -92,6 +92,10 @@ def download_chapter(url, download_dir): download_file(image_url, image_path) img_number += 1 + if img_number == 1: + print("Failed to find images for chapter") + exit(2) + with open(os.path.join(download_dir, ".finished"), "w") as file: file.write("1") -- cgit v1.2.3