From 5724929678b2a4ba4e076ada85406eca0b4e3ae9 Mon Sep 17 00:00:00 2001 From: torbica Date: Thu, 24 May 2018 16:29:47 +0200 Subject: [PATCH] Break if already downloaded x times same as in AbstractHTMLRipper --- .../com/rarchives/ripme/ripper/AbstractJSONRipper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/AbstractJSONRipper.java b/src/main/java/com/rarchives/ripme/ripper/AbstractJSONRipper.java index 8c73bbb6..fb082af2 100644 --- a/src/main/java/com/rarchives/ripme/ripper/AbstractJSONRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/AbstractJSONRipper.java @@ -71,6 +71,11 @@ public abstract class AbstractJSONRipper extends AlbumRipper { if (isStopped()) { break; } + if (alreadyDownloadedUrls >= Utils.getConfigInteger("history.end_rip_after_already_seen", 1000000000) && !isThisATest()) { + sendUpdate(STATUS.DOWNLOAD_COMPLETE, "Already seen the last " + alreadyDownloadedUrls + " images ending rip"); + break; +} + index += 1; logger.debug("Found image url #" + index+ ": " + imageURL); downloadURL(new URL(imageURL), index); @@ -104,4 +109,4 @@ public abstract class AbstractJSONRipper extends AlbumRipper { } return prefix; } -} \ No newline at end of file +}