From e30caaecda3c4e46e0821014ec2014132dd52960 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 11 Sep 2018 05:14:58 -0400 Subject: [PATCH] JagodibujaRipper now stops ripping when the ripper is stopped --- .../rarchives/ripme/ripper/rippers/JagodibujaRipper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/JagodibujaRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/JagodibujaRipper.java index c7f7df71..d5df1fe5 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/JagodibujaRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/JagodibujaRipper.java @@ -50,6 +50,12 @@ public class JagodibujaRipper extends AbstractHTMLRipper { public List getURLsFromPage(Document doc) { List result = new ArrayList<>(); for (Element comicPageUrl : doc.select("div.gallery-icon > a")) { + // Check if the ripper has been stopped + try { + stopCheck(); + } catch (IOException e) { + return result; + } try { sleep(500); Document comicPage = Http.url(comicPageUrl.attr("href")).get();