mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-27 15:49:50 +02:00
Merge pull request #1137 from Krabbyos/master
fixed image albums failing to download any images (giving "already downloaded" for every url)
This commit is contained in:
@@ -51,15 +51,6 @@ public abstract class AlbumRipper extends AbstractRipper {
|
|||||||
* Queues multiple URLs of single images to download from a single Album URL
|
* 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) {
|
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.
|
// Only download one file if this is a test.
|
||||||
if (super.isThisATest() &&
|
if (super.isThisATest() &&
|
||||||
(itemsPending.size() > 0 || itemsCompleted.size() > 0 || itemsErrored.size() > 0)) {
|
(itemsPending.size() > 0 || itemsCompleted.size() > 0 || itemsErrored.size() > 0)) {
|
||||||
@@ -96,14 +87,7 @@ public abstract class AlbumRipper extends AbstractRipper {
|
|||||||
}
|
}
|
||||||
threadPool.addThread(dft);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user