From b1d22577f160b003e81cb45cf9d29ced19984fe0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 17 Aug 2022 18:26:10 +0200 Subject: Mangakatana: try different image mirror if download fails --- plugins/mangakatana.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/mangakatana.py b/plugins/mangakatana.py index 02337d1..4686715 100755 --- a/plugins/mangakatana.py +++ b/plugins/mangakatana.py @@ -106,9 +106,11 @@ def download_chapter(url, download_dir): image_path = os.path.join(download_dir, image_name) print("Downloading {} to {}".format(image_source, image_path)) if not download_file(image_source, image_path): - print("Failed to download image: %s" % image_source) - os.remove(in_progress_filepath) - exit(2) + image_source = image_source.replace("://i3", "://i2") + if not download_file(image_source, image_path): + print("Failed to download image: %s" % image_source) + os.remove(in_progress_filepath) + exit(2) img_number += 1 if img_number == 1: -- cgit v1.2.3