Quote:
Originally Posted by jdorg
is it possible to also reconnect and not just stop and restart?
|
Code:
// Request reconnect 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.
if (running() && !limitEnabled() && getAverageSpeed() < minSpeed * 1024) {
requestReconnect();
}
// Check if all downloads are resumeable and 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.isResumeable() || link.getDownloadDuration() < minDuration * 60 * 1000) {
return false;
}
}
return true;
}
return false;
}
// Check if Speed limit or pause is currently enabled
function limitEnabled() {
if (callAPI("config", "get", "org.jdownloader.settings.GeneralSettings", null, "downloadspeedlimitenabled") || isDownloadControllerPaused()) {
return true;
}
return false;
}
Quote:
Originally Posted by jdorg
...is there a way to make buttons for the toolbar, that actives/deactivates an specific script from the event scripter list?
|
Not that I know of. And yes, just disabling the event scripter does not seem to terminate running scripts. Seems it needs to be disabled in the list.
Quote:
Originally Posted by jdorg
thank you for your work/help
:)
|
You are welcome