View Single Post
Old 13.10.2019, 20:50
mgpai mgpai is offline
Script Master
Join Date: Sep 2013
Posts: 1,208

Originally Posted by RPNet-user View Post
... set an event script to auto-resume partially downloaded files while JD2 is running?
// Unskip and start downloading links with "Invalid download directory" message, if the destination folder is available.
// Trigger : A Download Controller Stopped

getAllFilePackages().forEach(function(package) {
    package.getDownloadLinks().forEach(function(link) {
        if (link.getSkippedReason() == "INVALID_DESTINATION") {
            if (getPath(package.getDownloadFolder()).exists()) {
                if (!isDownloadControllerRunning()) startDownloads();

I would not recommend using 'interval' unless you have to, especially if you are having a lot of links. You may end up needlessly iterating through the list using up valuable system resources.

Also, the error might be symptomatic of hardware issues. It might be better to fix the underlying cause. If you provide more information, Jiaz might be able to look into it.
Reply With Quote