JDownloader Community - Appwork GmbH
 

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 29.03.2017, 09:01
Tyler Tyler is offline
JD Legend
 
Join Date: Jul 2010
Posts: 581
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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 21:10.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.