JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 06.12.2019, 05:45
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,420
Default How to pass information from a decrypter to another decrypter plugin?

How to pass information from a decrypter to another decrypter plugin?
Sometimes we need to pass filename to another decrypter plugin.
Error:
The method getStringProperty(String, null) is undefined for the type CryptedLink
__________________
FAQ: How to upload a Log
Reply With Quote
  #2  
Old 07.12.2019, 02:37
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,286
Default

CrawledLink source = getCurrentLink();
if (source != null) { source.get...
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 07.12.2019, 08:50
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,420
Default

Thanks, raztoki, but it still get error:
The method getStringProperty(String, null) is undefined for the type CrawledLink
The method getFinalFileName() is undefined for the type CrawledLink
__________________
FAQ: How to upload a Log
Reply With Quote
  #4  
Old 07.12.2019, 08:54
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,286
Default

getDownloadLink first? everything is within DownloadLink for memory and not CrawledLink
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #5  
Old 07.12.2019, 15:19
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,420
Default

CrawledLink source = getCurrentLink();
if (source != null) {
DownloadLink link = source.getDownloadLink(); // This gives link == null
if (link != null) {
String filename = link.getStringProperty("filename", null);
logger.info("filename: " + filename);
}
}
__________________
FAQ: How to upload a Log
Reply With Quote
  #6  
Old 10.11.2020, 11:07
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,420
Default

@Jiaz,
Can you help this?
Thanks.
__________________
FAQ: How to upload a Log
Reply With Quote
  #7  
Old 10.11.2020, 11:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,644
Default

Please contact me via support@jdownloader.org and explain what you want to do/maybe provide example links/code?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 11.11.2020, 07:12
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,420
Default

@Jiaz,
I had sent an email yesterday.
Thanks.
__________________
FAQ: How to upload a Log
Reply With Quote
  #9  
Old 11.11.2020, 10:19
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,644
Default

I've responded to your mail but not checked for new answers yet
__________________
JD-Dev & Server-Admin
Reply With Quote
  #10  
Old 11.11.2020, 17:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,644
Default

Wait for next Core Update. You can then call CryptedLink.getDownloadLink to get source of the current CryptedLink to process. You can store/read properties that way. You have to check getDownloadLink != null !
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 12.11.2020, 10:54
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,420
Default

Thanks, Jiaz.

For the record:
See Revision 43201 (and 43203).
1st decrypter:
final DownloadLink downloadLink = createDownloadlink(url);
if (!StringUtils.isEmpty(name)) {
downloadLink.setProperty("file_name", name);
}
2nd decrypter:
String name = param.getDownloadLink() != null ? param.getDownloadLink().getStringProperty("file_name", null) : null;
__________________
FAQ: How to upload a Log
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 17:29.
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 - 2021, Jelsoft Enterprises Ltd.