From 8c86377a7faccbb941b82802e295a983b925251d Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sun, 25 Feb 2018 18:10:38 -0500 Subject: [PATCH] Implemented a last seen feature; Added comments --- .../com/rarchives/ripme/ripper/AbstractHTMLRipper.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java b/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java index e71eb389..d49c3292 100644 --- a/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java @@ -68,7 +68,14 @@ public abstract class AbstractHTMLRipper extends AlbumRipper { Document doc = getFirstPage(); while (doc != null) { + logger.debug("alreadyDownloadedUrls is " + alreadyDownloadedUrls); + if (alreadyDownloadedUrls >= Utils.getConfigInteger("skip_after_already_seen", -1) && !isThisATest()) { + sendUpdate(STATUS.DOWNLOAD_COMPLETE, "Already seen the last " + alreadyDownloadedUrls + " images ending rip"); + break; + } List imageURLs = getURLsFromPage(doc); + // If hasASAPRipping() returns true then the ripper will handle downloading the files + // if not it's done in the following block of code if (!hasASAPRipping()) { // Remove all but 1 image if (isThisATest()) {