Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history.end_rip_after_already_seen only works if remember.url_history is true #1013

Open
cyian-1756 opened this issue Oct 19, 2018 · 0 comments · May be fixed by #1014
Open

history.end_rip_after_already_seen only works if remember.url_history is true #1013

cyian-1756 opened this issue Oct 19, 2018 · 0 comments · May be fixed by #1014

Comments

@cyian-1756
Copy link
Collaborator

  • Ripme version: 1.7.68
  • Java version: 1.8.0_181-8u181
  • Operating system: Ubuntu 16.04
  • Exact URL you were trying to rip when the problem occurred:
  • Please include any additional information about how to reproduce the problem:

Expected Behavior

Ripme ends the current rip after finding 5 items it already downloaded (assuming history.end_rip_after_already_seen is set to 5)

Actual Behavior

Ripme only ends the current rip if remember.url_history is set to true. This is because history.end_rip_after_already_seen checks the alreadyDownloadedUrls var and alreadyDownloadedUrls is only incremented in the following if

    // 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;
            }
        } 

Another check should be added in DownloadFileThread.java. Something like

if (saveAs.exists() && !observer.tryResumeDownload()) {
    alreadyDownloadedUrls += 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant