View Single Post
  #1671  
Old 27.03.2021, 14:47
nicolau nicolau is offline
Modem User
 
Join Date: Mar 2021
Posts: 1
Default

Can anybody help me? I use several proxies to go through the download limit, however the connection of a new link takes around 5 minutes due to the quality of my proxy. To avoid blocking captchas I always leave a maximum of 3 active downloads at a time. I would like the script to start the connection process for a new download when 5 minutes are left to complete an active download, calling this script:
Code:
setDownloadsPaused(false);
My script:
Code:
// Keep always 3 active downloads
// Trigger Required: "Interval"
var links = getRunningDownloadLinks();
var minDuration = 1;
var n = 0;

// Check active downloads
if (links.length > 0) {
    for (i = 0; i < links.length; i++) {
        var link = links[i];
        if (link.getDownloadDuration() > minDuration * 60 * 1000) {
            n++;
        }
    }
}

// Downloads manager
if (n >= 3 && isDownloadControllerPaused() == false) {
    setDownloadsPaused(true);
}

if (n < 3 && isDownloadControllerPaused() == true) {
    setDownloadsPaused(false);
}
Note: Captchas are solved automatically

Last edited by nicolau; 27.03.2021 at 14:57.
Reply With Quote