JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 05.01.2021, 09:03
crocolord crocolord is offline
JD Beta
 
Join Date: Oct 2010
Posts: 59
Default Insert dynamic variable to be used only at download time?

I noticed that when you submit a package to Jdownloader2 using the MyJdownloader plugin from a browser, that the "Save To" can have a dynamic variable like
Code:
<JD:Packagename>
and have it only be evaluated at download time. I can change the package name and nothing will happen to the path, and it appears to not get evaluated until the download happens.

If I try to use insert that same variable myself as part of the path when editing the path or creating a download package myself, the variable is evaluated immediately to whatever the package name is. Is it possible to insert the variable manually, and have it behave the same as from the plugin, i.e. not evaluate to the current value right away?

Thank you!
Reply With Quote
  #2  
Old 05.01.2021, 12:03
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 71,652
Default

This dynamic tag is only evaluated in Linkgrabber section.
Once you move the links to Downloadlist, the dynamic tag is replaced by its actual value.

The dynamic tag is case sensitive ! and must be
Quote:
<jd:packagename>
tags are only supported in Linkgrabber. Once moved to Downloadlist they are all replaced by their actual values
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 05.01.2021, 17:32
crocolord crocolord is offline
JD Beta
 
Join Date: Oct 2010
Posts: 59
Default

Quote:
Originally Posted by Jiaz View Post
This dynamic tag is only evaluated in Linkgrabber section.
Once you move the links to Downloadlist, the dynamic tag is replaced by its actual value.
In LinkGrabber is where I'm talking about. I'm not clear exactly why/when it happens, but most of the time when the value is substituted immdiately inside the LinkGrabber if I am editing the path manually (it never happens for a package sent from a browser with the token set as part of the path).

For instance, if a package were called "test" the current download path could be:
/downloads/something
if I try to change that to:
Code:
/downloads/<jd:packagename>
it will perform the substitution immediately, and it will set the path, in LinkGrabber, to
/downloads/test
Reply With Quote
  #4  
Old 05.01.2021, 17:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 71,652
Default

You will not be able to see the dynamic tag in table, but when you rename the package, the folder should also change with dynamic tag in place. The substitution will happen immediately but internally the dyamic tag still exists.
I will update tooltip of directory column to also show the dynamic path
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 05.01.2021 at 17:43.
Reply With Quote
  #5  
Old 05.01.2021, 17:45
crocolord crocolord is offline
JD Beta
 
Join Date: Oct 2010
Posts: 59
Default

An additional behavior I've just noticed...it seems like this visually happens when I first click on a package and change the path from a static path to the path with the variable, the substitution is reflected right away.

If I then change it again to contain the variable, it will keep the variable.
BUT...if I click on a different package, and click back to the same package again, it will show the path as a static path, having performed the substitution at that point.

This is all within the LinkGrabber...so to summarize in steps to repeat:
  1. Select a package with a static "Save To" destination.
  2. Change the destination to include the jd:packagename variable. JD performs the substitution visibly immediately.
  3. Without changing packages, change the destination to include the variable again. It will keep the variable this time.
  4. Select a different package.
  5. Return to the package attempting to use the variable- it will show the path as static, with the substitution having occurred.

All that said, now that I can get it to act predictably for me, I can work with that. I just have to remember to make sure to set the package name first before I try and insert the variable into the path.

Thanks!
Reply With Quote
  #6  
Old 05.01.2021, 17:46
crocolord crocolord is offline
JD Beta
 
Join Date: Oct 2010
Posts: 59
Default

Quote:
Originally Posted by Jiaz View Post
You will not be able to see the dynamic tag in table, but when you rename the package, the folder should also change with dynamic tag in place. The substitution will happen immediately but internally the dyamic tag still exists.
I will update tooltip of directory column to also show the dynamic path
Ah, ok! That explains what I'm seeing in my follow on post. Thank you!
Reply With Quote
  #7  
Old 05.01.2021, 18:09
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 71,652
Default

Update will be available in next 5 minutes, then the tooltip in directory column will show the dynamic tags if there are any
__________________
JD-Dev & Server-Admin
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 06:13.
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.