JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 05.05.2022, 00:14
rowe4 rowe4 is offline
Junior Loader
 
Join Date: Apr 2021
Posts: 11
Default Removing text before first left bracket from packagename

I'm downloading from nhentai and the package will name itself the number at the end of the URL and then the title of the hentai.

URL:**External links are only visible to Support Staff****External links are only visible to Support Staff**
Resulting packagename:292763 (C93) [Himeya (Abe Inori)] Saimin Kanryou Sex Slave Order (Fate_Grand Order) [English] [xinsu]

At first, I wanted to remove the URL numbers that precede title when the package name is generated. Now I want to remove everything in front of the first left bracket because I don't like the "(C93)".

The regex I came up with from regexr.com was "^[^\[]+" because that grabs everything before the first bracket. Now, can I use this to delete the stuff the regex grabs, or should I use something like "\[.*" to grab everything after the bracket?

I've been trying the latter like package name contains "\[.*" then set Package name <jd:orgpackagename:1>, adding the ":1" like I saw in other threads that were using <jd:orgfilename:1>, but it's not working.
Reply With Quote
  #2  
Old 05.05.2022, 09:40
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 62,604
Default

Hi,
the following rule should do what you want:

More info about our Packagizer feature: Click
EDIT

Additionally you should use "If sourceurl(s) -> Contains -> nhentai.net" to make sure that this rule is only applied for nhentai items!
__________________
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

Last edited by pspzockerscene; 05.05.2022 at 12:17.
Reply With Quote
  #3  
Old 05.05.2022, 21:00
rowe4 rowe4 is offline
Junior Loader
 
Join Date: Apr 2021
Posts: 11
Default

Thank you! It works great. I have only one question. When I try your solution out in regexr.com, it grabs literally everything. What is the difference in the regex there and the regex on Jdownloader?
Reply With Quote
  #4  
Old 06.05.2022, 10:16
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,935
Default

@rowe4: check with regex101.com, there you can see the matching group
also on regexr.com, the tooltip shows the proper matching group
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 06.05.2022, 10:17
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 62,604
Default

* and also make sure to select the correct flavor in regex101.com ("Java 8").
__________________
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
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 01:45.
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.