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/mangadex.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/mangadex.py') diff --git a/plugins/mangadex.py b/plugins/mangadex.py index a1e004b..292db35 100755 --- a/plugins/mangadex.py +++ b/plugins/mangadex.py @@ -128,6 +128,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