View Single Post
Old 04.02.2017, 11:49
jdorg jdorg is offline
Baby Loader
Join Date: Feb 2017
Posts: 7

Originally Posted by mgpai View Post
// Auto stop/restart downloads if the current average speed is below limit.
// Trigger Required: "Interval"

var minSpeed = 128; // (KiB/s) <- minimum average download Speed.
var minDuration = 1; // (minutes) <- minimum download duration per link.
var waitTime = 1; // (minutes) <- wait time before restart.

if (running() && getAverageSpeed() < minSpeed * 1024) {
    sleep(waitTime * 60 * 1000);

// Check if all downloads have been running for atleast the minimum duration.
function running() {
    var links = getRunningDownloadLinks();
    if (links.length > 0) {
        for (i = 0; i < links.length; i++) {
            var link = links[i];
            if (link.getDownloadDuration() < minDuration * 60 * 1000) {
                return false;
        return true;
    } else {
        return false;

is it possible to also reconnect and not just stop and restart?

while testing, i realized that if i activate the speed limit in jdownloader and the speed is below the limit in your script, than it also activates the script.
could you maybe add an "suspend the script code" if "speed limit" in jdownloader is active?

and is there a way to make buttons for the toolbar, that actives/deactivates an specific script from the event scripter list?

i tried the "activate/deactivate Event Scripter Button", but it doesn't seem to work.
even if i deactivate the Event Scripter the activated scripts still run.
and i have to deactivate them in the Event Scripter List in the settings tab.
i think to get the "activate/deactivate Event Scripter Button" to work it needs a restart and thats not practical.

thank you for your work/help

Last edited by jdorg; 04.02.2017 at 11:51.
Reply With Quote