Quote:
Originally Posted by Mydgard
... found a example eventscripter "Download zurücksetzen wenn Geschwindigkeit niedrig", can anyone explain a little bit?
|
Explanation is provided in script comments (green colored text).
Quote:
Originally Posted by Mydgard
Would like to use that only for rapidgator
|
Replace the example script with the following:
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++) {
//check if download host is rapidgator.net
if (running[i].getHost() == "rapidgator.net") {
//check if the download has been running at least 30 seconds
if (running[i].getDownloadDuration() > 30000) {
//check if the current speed is below 50kb/s
if (running[i].getSpeed() < 50 * 1024) {
//stop the download and restart it
running[i].abort();
}
}
}
}
}