#1
|
|||
|
|||
Getters on archive return null in EventScripter
Hi guys,
I recently discovered the EventScripter feature of JDownloader. However the following code fails, archive is undefined and as a result, all getters just return null. Code:
var paths = archive.getExtractedFilePaths(); if (paths !== null) writeFile(JD_HOME + "/log.txt", JSON.stringify(paths), false); Kind regards |
#2
|
||||
|
||||
Please know that some getters do now work in *Test* Mode because of dummy objects.
also it will only return !=null if there are extracted files. null = nothing got extracted
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
I tested it with valid data. Extraction works fine, "archives" however is empty.
|
#4
|
||||
|
||||
Can you provide example archives/log/example script?
Cannot reproduce the issue
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
Found my mistake. paths does not seem to be serializable which resulted in an error. At the same time writeFile failed because I set the "append" flag to false, thinking it would erase the file's content before writing to it. However an exception was raised because the file already existed.
|
#6
|
||||
|
||||
getExtractedFilePaths returns FilePath objects and no String.
So you will have to iterate through results and build string yourself Thanks for the feedback!
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|