Merge pull request #623 from torbica/master

Fix history again
This commit is contained in:
cyian-1756 2018-05-29 23:49:24 -04:00 committed by GitHub
commit 4d54f4731d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,12 @@ public abstract class AbstractJSONRipper extends AlbumRipper {
while (json != null) { while (json != null) {
List<String> imageURLs = getURLsFromJSON(json); List<String> imageURLs = getURLsFromJSON(json);
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;
}
// Remove all but 1 image // Remove all but 1 image
if (isThisATest()) { if (isThisATest()) {
while (imageURLs.size() > 1) { while (imageURLs.size() > 1) {
@ -71,10 +77,6 @@ public abstract class AbstractJSONRipper extends AlbumRipper {
if (isStopped()) { if (isStopped()) {
break; 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; index += 1;
logger.debug("Found image url #" + index+ ": " + imageURL); logger.debug("Found image url #" + index+ ": " + imageURL);