JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 22.11.2021, 19:39
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default change dlc filename and export embedded change

Hi,
Firstly, awesome piece of software keep up the great work.

secondly,
- if I have a DLC file, which loads and works.
- I want to change the file name of the DLC (in the interface I can rename it, which works)

- how can I change the DLC to keep that name change when I export it as "new" dlc file?

Last edited by snuffleupagus; 22.11.2021 at 20:21.
Reply With Quote
  #2  
Old 22.11.2021, 21:20
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 60,118
Default

Hi,
that is not possible.

I'm not sure but maybe this can be acomplished using an EventScripter script.

Keep in mind that when importing/exporting a DLC, the link to that DLC is lost so there is no reason for JD to save/re-use that first name.
Also most of all times, you will have more/less links (= a different downloadlist) when exporting a DLC again so your use-case is very exotic.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #3  
Old 23.11.2021, 02:15
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

I was thinking another way. If you can't modify the dlc to append the desired text when you export it. Can you do something where you modify the dlc filename with -UNIQUEID (ex. -thisValue1) itself and have jdownloader read the name of the DLC, when it's reading the content of the DLC and take -thisValue1 and append it to the file itself?

essentially
- read dlc ( ex. hello -thisvalue1.dlc)
- parse the -thisValue1 (as -thisValue1)
>>-thisValue1
- append it to the filename that is being downloaded.
>> <dlc filename><-appended: -thisValue1>.extension
ex. final file name>> hello -thisValue1.<extension>

??

thank you

Last edited by snuffleupagus; 25.11.2021 at 00:05.
Reply With Quote
  #4  
Old 23.11.2021, 16:39
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 60,118
Default

I guess only Jiaz can answer this question.
It might be possible using a Packagizer rule and if not, it might be possible using an EventScripter script.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #5  
Old 23.11.2021, 18:26
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

Thanks for the response. Greatly appreciate it. Hopefully it can be done. Since it'll help me greatly when routing files to folders with this "-tag"
Reply With Quote
  #6  
Old 25.11.2021, 00:02
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

@pspzockerscene - thanks for the suggestion. I'm assuming @Jiaz must be super busy. Would love this capability and @jiaz input.
Reply With Quote
  #7  
Old 25.11.2021, 03:40
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 60,118
Default

Yap he is super busy but afaik he will go through all threads with this prefix so please wait up to 7 days longer (weekends not included).
You are free to push this thread again after that time.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #8  
Old 02.12.2021, 18:00
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

friendly nudge on assistance/resolution on this

Last edited by snuffleupagus; 04.12.2021 at 21:05.
Reply With Quote
  #9  
Old 07.12.2021, 19:23
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

Hi, any update on this request?
Reply With Quote
  #10  
Old 07.12.2021, 19:42
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 60,118
Default

No.
Please continue to wait until Jiaz finds time to answer this request.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #11  
Old 15.12.2021, 19:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

Quote:
Originally Posted by snuffleupagus View Post
I was thinking another way. If you can't modify the dlc to append the desired text when you export it. Can you do something where you modify the dlc filename with -UNIQUEID (ex. -thisValue1) itself and have jdownloader read the name of the DLC, when it's reading the content of the DLC and take -thisValue1 and append it to the file itself?
So you want to add "something" to the filename of the DLC and then want this "something" to be added to the loaded links/filenames? right? That's possible via Packagizer, you can use the sourceURL, contains
Quote:
file:.+/([^/]+)\\.dlc
enable Regex Checkbox and set
filename to
Quote:
<jd:orgfilename>-<jd:source:1>.<jd:orgfiletype>
then the name of the DLC will be append to filename.
of course you can modify the matching pattern to just match on wanted part of filename

In case you need further help, just let me know
__________________
JD-Dev & Server-Admin
Reply With Quote
  #12  
Old 17.12.2021, 01:01
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

@jiaz - thank you for the response. I attempted to do as shared but not getting the desired result.

Desire is:
- use a DLC file ex "welcome -test.dlc"
- append the "-test" to the file downloaded file from the DLC
--ex. if actual download for the file name is "Hello.mp4" then the resulting download file would be "Hello -test.mp4"

I'm a bit new the customization of JD. SO any direction or help would be greatly appreciated.

Here's the Packagizer entry.
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #13  
Old 17.12.2021, 11:30
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

@snuffleupagus: my bad. the end must be
Quote:
\.dlc
and not
Quote:
\\.dlc
you should keep the file: prefix so this rule is only applied to dlc files and not dlc urls
__________________
JD-Dev & Server-Admin
Reply With Quote
  #14  
Old 17.12.2021, 20:06
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

@Jiaz - thank you for the quick response. Any help would be greatly appreciated.

Firstly thank you for the direction it does read the filename of the file and add it to the file. just not exactly as desired or expected

There are a few issues:
- "welcome -test.dlc" >> file rename >> "Hello.mp4" >> "Hello.mp4-welcome -test.mp4"
-- desired is "Hello -test.mp4"

- issues
-- "-" is appended to the front with the entire name "welcome -test" of the dlc is appended to the file when only "-test" should be
-- there are 2 extension added.

Latest: **External links are only visible to Support Staff****External links are only visible to Support Staff**

Thank you for any help.

Last edited by snuffleupagus; 17.12.2021 at 20:23.
Reply With Quote
  #15  
Old 21.12.2021, 00:15
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

So this

Code:
<jd:orgfilename>-<jd:source:1>.<jd:orgfiletype>
should be

Code:
<jd:orgfilenamewithoutext> - <jd:source:1>.<jd:orgfiletype>
question:

Code:
file:.+/([^/]+)\.dlc
How do I

currently:

Code:
take "welcome -test.dlc" to returns "welcome -test"
how do I change the regex to get only

Code:
 "-test"
Reply With Quote
  #16  
Old 21.12.2021, 08:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by snuffleupagus View Post
... how do I change the regex to get only

Code:
 "-test"
Code:
file:.+/.+(-.+)\.dlc
Reply With Quote
  #17  
Old 21.12.2021, 17:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

This should work fine
Quote:
file:.+/[^/]+-([^/]+)\.dlc
__________________
JD-Dev & Server-Admin
Reply With Quote
  #18  
Old 21.12.2021, 22:16
snuffleupagus snuffleupagus is offline
JD Beta
 
Join Date: Feb 2020
Posts: 57
Default

Thank you both @mgpai @Jiaz for the response. I was wondering does JD2 use regex differently? I'm somewhat aware of regex but these pattern matching is a little different than what I'm aware of or expect.

Using regex101.com they don't seem to work but they seem to work in JD

if I use

Regex 101 example - Shows pattern error
Code:
file:.+/.+(-.+)\.dlc
Regex 101 example - Shows pattern error
Code:
file:.+/[^/]+-([^/]+)\.dlc
Could you share why this pattern doesn't work with JD2?
Code:
-(.*)\.dlc
Which does work on the regex101 site - doesn't show pattern error.


Just trying to see where I can learn how to use JD2 regex more accurately?

Last edited by snuffleupagus; 21.12.2021 at 22:28.
Reply With Quote
  #19  
Old 22.12.2021, 11:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

You need to escape the
Quote:
/
in regex101.see the warning
Quote:
/ An unescaped delimiter must be escaped with a backslash (\)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #20  
Old 22.12.2021, 11:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

Quote:
Originally Posted by snuffleupagus View Post
Could you share why this pattern doesn't work with JD2?
Code:
-(.*)\.dlc
Works perfectly fine here. Just tested. Can you please export your rule and attach here or create screenshot. Regex Checkbox is enabled?
__________________
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 04:51.
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 - 2022, Jelsoft Enterprises Ltd.