-
Notifications
You must be signed in to change notification settings - Fork 0
Download Clients
Atrox edited this page Jan 2, 2017
·
2 revisions
You need to activate the Event Scripter extension and add the following two scripts:
Trigger: Package finished
var path = package.getDownloadFolder()
var links = package.getDownloadLinks() ? package.getDownloadLinks() : []
function isReallyFinished() {
for (var i = 0; i < links.length; i++) {
if (links[i].getArchive() != null && links[i].getExtractionStatus() != "SUCCESSFUL" || !package.isFinished()) {
return false
}
}
return true
}
if (isReallyFinished()) {
var command = ["cain", "run", "--path", path]
log(command)
log(callSync(command))
}
Trigger: Archive extraction finished
var links = archive.getDownloadLinks() ? archive.getDownloadLinks() : []
var package = links.length > 0 ? links[0].getPackage() : null
function isReallyFinished() {
for (var i = 0; i < links.length; i++) {
if (links[i].getArchive() != null && links[i].getExtractionStatus() != "SUCCESSFUL" || !package.isFinished()) {
return false
}
}
return true
}
if (package && isReallyFinished()) {
var command = ["cain", "run", "--path", package.getDownloadFolder()]
log(command)
log(callSync(command))
}
Should look like this afterwards:
If your client is missing, please open a issue.