Thread: [See Bugtracker] Minimum speed?
View Single Post
  #9  
Old 25.10.2015, 11:55
Nice2MeetYou Nice2MeetYou is offline
Ultra Loader
 
Join Date: Oct 2015
Posts: 49
Default

I modified it to this but I have noticed that a lot of times it restarts even though the speed is over 1mb.

Code:
//check if downloads are running at all
if (isDownloadControllerRunning() && !isDownloadControllerStopping()) {
    var running = getRunningDownloadLinks();
    //loop through all running Downloads
    for (var i = 0; i < running.length; i++) {
        if (running[i].getDownloadDuration() > 20000) {
            if (getTotalSpeed() < (1000 * 1024)) {
                stopDownloads();
                do {}
                while (!isDownloadControllerIdle());
                startDownloads();
            }

        }
    }
}
Reply With Quote