View Single Post
  #61  
Old 29.03.2017, 09:01
Tyler Tyler is offline
JD Legend
 
Join Date: Jul 2010
Posts: 582
Default

Quote:
Originally Posted by mgpai View Post
Code:
// Stop and restart slow links.
// Trigger Required: "Interval" (Recommended: 30000 or more).
// IMPORTANT: Enable "Synchronous execution of script" (checkbox).

var minSpeed = 128; // (KiB/s) <- minimum download speed per link.
var minDuration = 1; // (minutes) <- minimum download duration per link.

var links = getRunningDownloadLinks();

for (i = 0; i < links.length; i++) {
    var link = links[i];
    if (link.getDownloadDuration() < minDuration * 60 * 1000) continue;
    if (link.getSpeed() > minSpeed * 1024) continue;
    link.abort();
}
and that restarts the links after x amount of time like the other one?
Reply With Quote