#1
|
|||
|
|||
![]()
Hi,
by default JDownloader changes question and exclamation marks in filenames to upside-down question and exclamation marks. I don't want this to happen, instead I do want to keep the regular question and exclamation marks in my filenames. Already I tried to add lines to Settings->Advanced Settings->GeneralSettings.filenamereplacemap, but all I ever get is an error message: Quote:
Thanks in advance! |
#2
|
||||
|
||||
![]()
@babaloo: The configuration is JSON syntax, you have to proper encode it AND proper escape your characters in Pattern
If you don't want to change the character, just remove it from the setting
__________________
JD-Dev & Server-Admin |
#3
|
||||
|
||||
![]()
Addendum:
Use (web)tools like jsoneditoronline.org to properly pre-check json data and also to be able to edit it in an easier way.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#4
|
|||
|
|||
![]()
Thanks for getting back at me.
Where and how can I do that? I thought some character changes, like exchanging a proper question mark with an inverted one, where hard coded into jDownloader. If I can just remove those changes that would be great! |
#5
|
||||
|
||||
![]()
See Settings -> Advanced settings:
Code:
GeneralSettings.packagenamereplacemap Code:
GeneralSettings.filenamereplacemap You cannot just remove that replacement because question marks are not allowed in filenames (yes I know, technically you could use them under Linux; we still don't allow them). So do not remove the entry but select another replace of your choice otherwise after that cleanup any remaining illegal chars will be replaced with underscore.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#6
|
|||
|
|||
![]() Quote:
So unless JDownloader changes this policy I will have to look for another download manager, because I don't want to change upside down question marks into real ones after the fact. |
#7
|
||||
|
||||
![]()
I'm sorry, but at this moment, we do not plan to change this.
We have given this matter careful consideration before implementing it and concluded that maintaining consistency across all systems is the best approach for several reasons, including: - You might be using Linux/Mac while setting a download destination on a Windows SMB drive. Allowing these chars would lead to download path problems then. - Allowing these characters could cause issues when migrating JD configurations from one OS to another. Here are your options: 1. Keep the current handling as it is and use an external application/script to rename the inverted question marks back to their intended characters. 2. or: Use an EventScripter script to achieve this (though I'm very unsure if this will work, as our internal replacement may interfere). EventScripter subforum: https://board.jdownloader.org/forumdisplay.php?f=52 EventScripter help article: https://support.jdownloader.org/know...event-scripter EDIT Addendum: Before we had the replace map, we just replaced all of these characters with underscores. The new handling is intended to use similar replacements in order to be able to track the original character/meaning and not just losing it. I understand that from your perspective this is still not _right_ :(
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 28.03.2025 at 09:12. Reason: EDIT |
#8
|
|||
|
|||
![]()
Thanks for explaining your decision.
Those two options don't work for me. I tried EventScripter but didn't get very far. Maybe because it won't work at all but it's easily possible that the whole thing is too complicated for me. I am not a coder at all. And everything after the fact, i.e. after the finished download, doesn't work with my workflow. |
#9
|
||||
|
||||
![]()
You only talked about the EventScripter option.
Why does the first option (external application/script) not work for you? Quote:
Please explain in more details.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#10
|
|||
|
|||
![]()
That's a big story. I often help students with video editing. Those students are spread all over the world and upload their clips on different platforms and services. Sometimes I deal with a single student, but most of the time it is about a project involving several students in several locations. In order to keep things organized and as simple as possible on my end I have a set of automations working, that are partially based on filenames.
This whole thing has been developed over years, works flawlessly but is a mess, if you look at it closely. I don't want to fiddle with it, especially as we are in a few big projects currently. But filenames are the basis of the automations, so they have to be as the students and I intended them to be. And in a couple of cases question marks are an important variable. |
#11
|
||||
|
||||
![]() Quote:
See I'm unable to provide a solution for you here and now but if you want I can create a ticket so we can address this in the future (we will not provide any ETA though!). I can think about an explicit opt out advanced setting aka "disable internal replacement of illegal characters". By the way; JDownloader is open source so as a 3rd option, you can of course change the code to allow these characters. See: https://support.jdownloader.org/know...up-ide-eclipse See: LinknameCleaner.java: Function: cleanFilename And/or one lever higher: CrossSystem.java Function: alleviatePathParts Code:
Spoiler:
Code:
public static String alleviatePathParts(String pathPart, final boolean removeLeadingHidingDot) { if (StringUtils.isEmpty(pathPart)) { if (pathPart != null) { return pathPart; } return null; } pathPart = pathPart.trim(); /* remove invalid chars */ /** * Integer value zero, sometimes referred to as the ASCII NUL character. * * Characters whose integer representations are in the range from 1 through 31->\\x00-\\x1f * * < (less than), * > (greater than), : (colon), " (double quote), / (forward slash), \ (backslash), | (vertical bar or pipe), ? * (question* mark) (asterisk) * * Volume designators (drive letters) are similarly case-insensitive. For example, "D:\" and "d:\" refer to the same volume. */ pathPart = pathPart.replaceAll("([\\\\|<|>|\\||\r|\n|\t|\"|:|\\*|\\?|/|\\x00-\\x1f])+", "_"); if (CrossSystem.isWindows() || CrossSystem.isOS2()) { /** * **External links are only visible to Support Staff** */ if (CrossSystem.isForbiddenFilename(pathPart)) { pathPart = "_" + pathPart; } } /* * replace starting dots by single dot (prevents directory traversal) */ if (removeLeadingHidingDot) { pathPart = pathPart.replaceFirst("^\\.+", ""); } else { pathPart = pathPart.replaceFirst("^\\.+", "."); } /* * remove ending dots, not allowed under windows and others os maybe too * * Do not end a file or directory name with a space or a period. */ pathPart = pathPart.replaceFirst("\\.+$", ""); pathPart = pathPart.trim(); if (StringUtils.isEmpty(pathPart)) { return "_"; } else { return pathPart; } }
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#12
|
|||
|
|||
![]()
An opt-out would be great. Thanks for thinking about it.
And over the weekend I will have a bit of time and might look at changing the code. No idea though which can of worms I'd be opening then. :D By the way, thanks a lot for what you guys are doing here at JDownloader. You really care about your "product" as much as about the community. I'd hate to leave a place like this. |
#13
|
||||
|
||||
![]()
Ticket:
Just to clarify this again: This ticket does not mean that the feature will ever be added. It's just a marker for us to collect the demand and to not forget about user requests. Me personally, I'am on your side: I think it makes sense to allow these characters (at least as a setting) for "advanced users who know what they're doing". EDIT Also, I really like customizable applications like JDownloader that allow the user to configure them however they want them to behave. Quote:
For bonus points, you can properly implement it and add a setting right away :D Quote:
![]() EDIT2 Small addendum: Here is an interesting thread in which we've chatted in depth about this topic with another user: https://board.jdownloader.org/showthread.php?t=95411
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 28.03.2025 at 11:18. Reason: EDIT2 |
#14
|
|||
|
|||
![]()
Thanks again!
Quote:
But even experienced users often can't adjust a software's behaviour to their liking. Very frustrating! So every setting that allows me to use a software as I want to is good. And yes, bury the dangerous stuff deep down in a settings' submenu, give a warning or two when a user enables it, but allow for the freedom. |
![]() |
Thread Tools | |
Display Modes | |
|
|