#21
|
||||
|
||||
The Script contains a lot of errors
1.) if links is empty, package will become null and then label will crash because of nullpointer exception 2.) redundant check. if there are links to the archive in archive.getDownloadLinks, then link.getArchive will never be null. this check does not make any sense 3.) no need to check package.isFinished for every link because it is always the same package I dont see what *deletion of the links* has to do with filebot. The links itself are not used at all for filebot. I guess the script simply fails because of the errors. You can inform rednoah about my comments and maybe he/she can fix the script. He/she can also contact us via support@jdownloader.org, so we can provide better help on this
__________________
JD-Dev & Server-Admin |
#22
|
|||
|
|||
Thx, just forwarded this thread to him
|
#23
|
|||
|
|||
I'm happy to accept pull requests:
Code:
**External links are only visible to Support Staff** Since there's people that know the API: * How do I get the package in the onArchiveExtracted event if there's no links? package isn't predefined like in the onPackageFinished call. * What variables can be null or empty? I'm just checking everything cause I have no idea. * I use the links[i].getArchive() in the onPackageFinished script as well, so the same code should work for both events this way. We can email if you want, but here in the forums is probably better so that this stuff is public and so that people can find it via Google. Last edited by rednoah; 06.04.2016 at 20:10. |
#24
|
||||
|
||||
I will check those scripts tomorrow inform you about possible changes/ideas.
For "onArchiveExtracted " there is no need to access the links. All important information should be available from archive itself. Maybe a native java solution (extension to JDownloader) would be better. That way ppl just place the .jar in their installation and it works after restart.
__________________
JD-Dev & Server-Admin |
#25
|
|||
|
|||
Having people copy the jar around is probably more tricky for most people than just using the installer packages and just making a command-line call.
I could get around the JD-glue-logic bash script. But since a bash script is the entry point for all the other filebot integrations, there's more help and support for that approach. |
#26
|
||||
|
||||
Okay, I will check the existings script and provide feedback how to change them to also work in all situations (eg no links are available)
__________________
JD-Dev & Server-Admin |
#27
|
|||
|
|||
Hey,
great to see you working together on this! Thx a lot! |
#28
|
|||
|
|||
Hey all,
may i ask if you already took a look at those scripts? |
#29
|
|||
|
|||
What's not working?
|
#30
|
||||
|
||||
I did not find time yet to review them. I saw some possible issues in situations like (links already gone or deep decrypt)
__________________
JD-Dev & Server-Admin |
#31
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/rednoah.js |
#32
|
|||
|
|||
Here's examples for the Event Scripter plugin:
Code:
github.com/filebot/plugins/tree/master/jdownloader |
#33
|
|||
|
|||
Thanks. I am not a filebot user so was not looking for scripts. I had previously (in this thread) suggested to make use of 2 triggers, but found it might be possible to call filebot using only 1 trigger. Thought I'll let you know.
|
#34
|
|||
|
|||
If you never process archives, then just PackageFinished will be fine. If you always process archives, then just ArchiveExtracted will be fine. However, if your downloads are mixed, then you will need both, because PackageFinished is called before ArchiveExtracted, unless you don't use JD for archive extraction, in which case ArchiveExtracted won't be necessary either.
|
#35
|
|||
|
|||
This script is designed to work for mixed downloads, using a single "Remote API Event Fired" trigger.
|
Thread Tools | |
Display Modes | |
|
|