#11
|
|||
|
|||
![]() HTML Code:
// Skip slow links and resume them after wait time.
// Trigger Required: "Interval" (Recommended: 30000 or more).
// IMPORTANT: Enable "Synchronous execution of script" (checkbox).
var minSpeed = 628; // (KiB/s) <- minimum download speed per link.
var minDuration = 1; // (minutes) <- minimum download duration per link.
var waitTime = 5; // (minutes) <- wait time before restart
//alert(myPackagizerLink);
var links = getRunningDownloadLinks();
var skipped = [];
for (i = 0; i < links.length; i++) {
var link = links[i];
if (link.getDownloadDuration() < 20000) continue;
if (link.getSpeed() > minSpeed * 1024) continue;
link.setSkipped(true);
skipped.push(link.getUUID());
}
if (skipped.length > 0) {
sleep(10000);
resumeLinks();
}
//functions
function resumeLinks() {
forcestart(packednameS="Films","MyISO","mypackage2")
callAPI("downloadsV2", "resumeLinks", skipped, []);
while (isDownloadControllerStopping()) sleep(1000);
if (!isDownloadControllerRunning()) startDownloads();
}
forcestart(packedname="Films") code... etc... no all downloads start. only my package with named "Films" force start.. Last edited by drjs5x; 02.04.2021 at 13:29. |
Thread Tools | |
Display Modes | |
|
|