Quote:
Originally Posted by Jiaz
In meantime you could 'hack' this by setting the extraction folder as comment and with help of Eventscripter script, read the comment and then customize the extraction folder once the links are in download list
|
Script:
Code:
// Parse/Set Extraction Folder from Link Comment
// Trigger: A Download Started
var archive = link.getArchive();
var comment = link.getComment();
if (archive && comment) {
var currentFolder = archive.getExtractToFolder();
var newFolder = comment.match(/^(?:[a-zA-Z]{1}:)?(?:\\|\/).+/) || currentFolder;
if (currentFolder != newFolder) {
var linkId = archive.getDownloadLinks()[0].UUID;
var archiveId = callAPI("extraction", "getArchiveInfo", [linkId], [])[0].archiveId;
callAPI("extraction", "setArchiveSettings", archiveId, {
"extractPath": newFolder.toString()
})
}
}