Hi Jiaz, sorry to bother you again.. I created a simple script as you suggested which should fetch the comment in the .crawljob files and then set the extraction folder:
Code:
var myString = package.getComment();
archive.setExtractToFolder(myString);
But there are multiple problems.
1st problem: When adding 'comment=sometest' to the crawljob file it simply does not read the comment. The variable is just ignored. Not matter what I put into it or just restarting jdownloader. It never displays anything in the 'Comment' table in the Download tab of Jdownloader. I also tested with this script:
Code:
var myString = package.getComment();
writeFile(JD_HOME + "/log.txt", JSON.stringify(myString) + "\r\n", true);
It simply writes 'null' the log.txt
2nd problem: there is simply no 'archive.setExtractToFolder();' variable in Jdownloader. There is only a archive.getExtractToFolder(); (
https://svn.jdownloader.org/issues/85038)
3rd problem: the 'archive....Extract...();' variables can only be used the with the 'Any extraction' trigger while package.getComment() can only be used with 'Package finished' trigger.