JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 06.04.2016, 18:01
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

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
Reply With Quote
  #22  
Old 06.04.2016, 18:44
jdjdjd123 jdjdjd123 is offline
Super Loader
 
Join Date: Nov 2014
Posts: 25
Default

Thx, just forwarded this thread to him
Reply With Quote
  #23  
Old 06.04.2016, 20:03
rednoah rednoah is offline
JD Alpha
 
Join Date: Dec 2015
Posts: 22
Default

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.
Reply With Quote
  #24  
Old 06.04.2016, 20:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

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
Reply With Quote
  #25  
Old 06.04.2016, 22:08
rednoah rednoah is offline
JD Alpha
 
Join Date: Dec 2015
Posts: 22
Default

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.
Reply With Quote
  #26  
Old 07.04.2016, 08:18
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

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
Reply With Quote
  #27  
Old 12.04.2016, 10:25
jdjdjd123 jdjdjd123 is offline
Super Loader
 
Join Date: Nov 2014
Posts: 25
Default

Hey,

great to see you working together on this! Thx a lot!
Reply With Quote
  #28  
Old 16.04.2016, 15:32
jdjdjd123 jdjdjd123 is offline
Super Loader
 
Join Date: Nov 2014
Posts: 25
Default

Hey all,

may i ask if you already took a look at those scripts?
Reply With Quote
  #29  
Old 16.04.2016, 15:51
rednoah rednoah is offline
JD Alpha
 
Join Date: Dec 2015
Posts: 22
Default

What's not working?
Reply With Quote
  #30  
Old 17.04.2016, 10:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

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
Reply With Quote
  #31  
Old 11.08.2018, 13:22
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by rednoah View Post
... Is there any event to make JD call my script exactly once and only once the download/extraction/etc is completely finished ...
Seems it might be possible after all. Haven't tested it with filebot though. Perhaps you can check and confirm.

Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/rednoah.js
Reply With Quote
  #32  
Old 12.08.2018, 05:45
rednoah rednoah is offline
JD Alpha
 
Join Date: Dec 2015
Posts: 22
Default

Here's examples for the Event Scripter plugin:
Code:
github.com/filebot/plugins/tree/master/jdownloader
Reply With Quote
  #33  
Old 12.08.2018, 08:04
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by rednoah View Post
Here's examples for the Event Scripter plugin:
Code:
github.com/filebot/plugins/tree/master/jdownloader
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.
Reply With Quote
  #34  
Old 12.08.2018, 09:15
rednoah rednoah is offline
JD Alpha
 
Join Date: Dec 2015
Posts: 22
Default

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.
Reply With Quote
  #35  
Old 12.08.2018, 09:34
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by rednoah View Post
... if your downloads are mixed, then you will need both ...
This script is designed to work for mixed downloads, using a single "Remote API Event Fired" trigger.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 10:47.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.