JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12.02.2021, 18:54
plip plip is offline
Wind Gust
 
Join Date: Jun 2016
Posts: 44
Default Is there a way to always replace one character with another (package and filename)?

Sorry if this is a dumb question. I'm new to wanting to automatically rename things and it's hard to figure out how to even get started.

For example when I catch something with linkgrabber I always want 【 to instead be [, and 】to be ], in both package and filename. All of the time.

What about longer things, like always shortening something like "Ch -EN" (case sensitive) to only "Ch" in package and filename?
Reply With Quote
  #2  
Old 12.02.2021, 18:59
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,911
Default

Hi,

sure - here are your options:
1. Select multiple packages or files and press F2.
or:
2. Another way if you want to automatically/permanently rename things: Packagizer rules
Keep in mind Packagizer rules have a very limited functionality if you want to use them to do complex renaming stuff but for simple tasks, they should get the job done.
or:
3. For advanced functionality, you could write one or multiple EventScripter Scripts.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || 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?

Last edited by pspzockerscene; 12.02.2021 at 19:18.
Reply With Quote
  #3  
Old 13.02.2021, 09:36
plip plip is offline
Wind Gust
 
Join Date: Jun 2016
Posts: 44
Default

Thanks! I figured out how to do most of the things I wanted in packagizer.

There's an exception I don't know how to get around. When a condition is met more than once, packagizer can't seem to find any of the matches except for the last one. I'll post an example.

I put into "package contains" (and file name contains): "*【*】*" (minus quotes)

In "then set" package name I put "<jd:orgpackagename:1>[<jd:orgpackagename:2>]<jd:orgpackagename:3>"
and in filename I put "<jd:orgfilename:1>[<jd:orgfilename:2>]<jd:orgfilename:3>"

That works if there's only one 【 and one 】. But if there's more than one of each, only the last 【 and 】get changed to [ and ].

Here's an example of something with multiple 【, and multiple 】:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

What I was expecting in linkgrabber is "OtakMori Translations - VTubers_[Hololive]Ollie Tricked Marine into Marriage After Multiple Rejections[Phasmophobia][Eng Sub]"

What actually shows up in linkgrabber is "OtakMori Translations - VTubers_【Hololive】Ollie Tricked Marine into Marriage After Multiple Rejections【Phasmophobia】[Eng Sub]"

As you can see only the last 【 and 】 gets changed to [ and ]. How could this be fixed to have all 【 become [, and all 】 become ], regardless of how many there are?

Last edited by plip; 13.02.2021 at 09:48.
Reply With Quote
  #4  
Old 13.02.2021, 11:47
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

package customiser wont work well for that since its fixed based on wildcards or regular expression pattern.
You will need to either create a rule for each possibility (duplicate rule && adjust) for say 2/3/4/5 brackets already in filename, or use the event scripter and javascript and you will be able to replace
or look at the event scripter, but you will have similar limitations (simple regex/or string replace) without creating code for example search/find for how many groups brackets there are, and use a for loop based on this number and create a new string with the formatting you'd like
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
Old 20.02.2021, 01:18
plip
Message deleted by pspzockerscene. Reason: Deleted on users' behalf
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 15:24.
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.