1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-28 16:19:58 +02:00

fixed image albums failing to download any images (giving "already downloaded" for every url) fixes issues #1135 and #1134

This commit is contained in:
Krabbyos
2018-12-28 22:36:10 -08:00
parent 58eaa818e4
commit 2eb135b321

View File

@@ -51,15 +51,6 @@ public abstract class AlbumRipper extends AbstractRipper {
* Queues multiple URLs of single images to download from a single Album URL
*/
public boolean addURLToDownload(URL url, File saveAs, String referrer, Map<String,String> cookies, Boolean getFileExtFromMIME) {
// Don't re-add the url if it was downloaded in a previous rip
if (Utils.getConfigBoolean("remember.url_history", true) && !isThisATest()) {
if (hasDownloadedURL(url.toExternalForm())) {
sendUpdate(STATUS.DOWNLOAD_WARN, "Already downloaded " + url.toExternalForm());
alreadyDownloadedUrls += 1;
return false;
}
}
// Only download one file if this is a test.
if (super.isThisATest() &&
(itemsPending.size() > 0 || itemsCompleted.size() > 0 || itemsErrored.size() > 0)) {
@@ -96,14 +87,7 @@ public abstract class AlbumRipper extends AbstractRipper {
}
threadPool.addThread(dft);
}
if (Utils.getConfigBoolean("remember.url_history", true) && !isThisATest()) {
LOGGER.info("Writing " + url.toExternalForm() + " to file");
try {
writeDownloadedURL(url.toExternalForm() + "\n");
} catch (IOException e) {
LOGGER.debug("Unable to write URL history file");
}
}
return true;
}