View Single Post
  #1554  
Old 21.10.2020, 07:04
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,415
Default

Quote:
Originally Posted by StarFury View Post
I would like JDownloader to switch a file to 'Disable' (gray out) if its Status is 'Temporarily unavailable', and skip to the next file.
Links with 'Temporarily unavailable' status do not use/block any download slots and as such will automatically start the next link without any user intervention. Also, if not disabled, JD will retry those links automatically when the timer ends.

In any case, here is a script which does what you requested:
Code:
/*
    Disable links with "FILE_TEMP_UNAVAILABLE" status
    Trigger: Interval (Recommended Interval: 60000 or more)
*/   

if (isDownloadControllerRunning()) {
    getAllDownloadLinks().forEach(function(link) {
        var csr = link.conditionalSkipReason;

        if (csr) {
            var skipReason = csr.waitingSkipReason;

            if (skipReason == "FILE_TEMP_UNAVAILABLE") {
                link.setEnabled(false);
            }
        }
    })
}
Reply With Quote