Quote:
Originally Posted by qwerti
Is it possible to modify it like this?
|
Replace "Limit running packages" script with this one. Please note, the script uses a different trigger.
Also remember to disable "Synchronous execution of script" checkbox in the top panel of the script editor.
Code:
/*
Limit running links/archives
Trigger : Download Controller Started
Important: Disable Synchronous execution of script checkbox in the top panel
*/
while (!getRunningDownloadLinks().length) {
sleep(1000);
}
var first = getName(getRunningDownloadLinks()[0]);
getAllDownloadLinks().forEach(function(link) {
if (!link.finished && getName(link) != first) {
link.skipped = true;
}
})
function getName(link) {
try {
return link.archive.name;
} catch (e) {
return link.name;
}
}