-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebUI: add multi-file renaming #18287
Conversation
I dont know what the developers think of this, but I think this is bloat that add unnecessary maintenance for the developers. |
I understand your concern, however I could use this feature and I'm sure many others could too. In addition, I planned on maintaining this feature. |
Can you define bloat for me? You voiced the same concern in the past for a larger featureset targeting the main GUI, but I truly wonder where the line is drawn for a new feature to be considered bloat or not. This is a significantly smaller patch that I think is worth looking into. Realistically, this will take some time to be reviewed. 5.0.0 is probably a better milestone for this PR. |
Do note that when i was testing the above, i somehow managed to make it create a new folder with the new name and the selected file was moved in it. Unfortunately i wanted to finish with the above and i thought i'd reproduce it later with more details but now i have no idea how i did it and what settings were related. An enhancement would be to create the window width with options on the left + longest filename x2 (so there is space for original and renamed columns). I didn't test regex and i went in blind (didn't read OP description). I had no idea what "Enumerate Files" does and i don't see how users will figure it out without some explanation.
Maybe i misunderstood what "the search will apply" means but i can only rename checked items. |
This is something I intentionally left in because the single file rename actually allows you to specify a folder path and the file will be moved into the folder path. i.e.
That said, I could intentionally block this behavior if it isn't what we'd like to see. I left it in because the existing single file rename allows that behavior.
I'm not opposed to this, however the window is already resizable, so I'd consider this as something that would be a good candidate for a next version
This is a really good point and if there is a hint icon
We can change the verbiage to be more concise. Correct you can only rename |
Updated #18287 (comment) to include:
|
Please do not block this behavior. I use it frequently when cross seeding and know others who do as well. Also linking #16906 #16834 #17049 |
Is there a way to use with a Filebot script to auto rename files in desired format ? |
Of course that's fine by me. The thing is, there was no slash involved when i did it. In fact it happened again now that i was re-testing the PR and although this time i payed attention i can't reproduce it again. What i did:
Ranamed
It became:
You didn't comment on the problem i described with bullet points at the beginning of #18287 (comment) which still happen by the way. It seems to be related with the unwanted folder creation described above because when that happened there was no error, Another problem that i just noticed is that the One last thing: any existing error from previous rename isn't cleared after a successful rename (in the same dialog). |
Interesting, would you mind uploading a video/gif of the behavior you're experiencing? One potential thing to test for reproducibility is refreshing the page before each test.
This suggests that order of operations matter's here. i.e.
I think you're correct about it being related. Essentially the rename all operation changes files one by one and if it encounters an error it will fire an event and continue renaming.
The columns remember their original position by default, I think this can be changed. such that both share an equal amount of horizontal space.
good catch haha I'll fix this. |
Unfortunately i can't reproduce it again.
|
87c8eef
to
60d8e50
Compare
@thalieht Okay I've pushed up some changes to fix the issues you were running into. I'll cover the changes in this comment.
Let me know if I missed anything or if my assumptions are incorrect and of course if you or anyone else run into a bug with the updated code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (as a tester)
d5b6fdb
to
f2f92e8
Compare
Pushed up changes to fix the WebUI linter errors generated from the linter workflow. |
@loligans I need this feature, I have a TV series with more than 1000 episodes and there is a jellyfin program that better recognizes files named in a certain way, and I would like to be able to rename from and still remain a torrent distributor. can I repeat your preview? it works? |
sounds good, i'm working on a change to move it into the rename dialog. |
@glassez the latest change moves the preference to the renaming window: i wanted to put the setting behind a cog-icon-button to avoid adding preferences directly to the main window, but for the sake of simplicity, i took the approach of displaying the preference and having an |
the functionality outlined in this pr will allow you to rename multiple files of a torrent as a bulk operation and still be able to remain a torrent distributor. the preview i have been using confirms this behavior |
@loligans Note that some flaws may remain hidden until it goes in the release so that many users will have access to it. I hope you'll still be here at that moment to fix them. |
yup, i plan to support this feature going forward! |
Hello, Could someone please detail on how to build / get a custom version of |
Can this be automated to act on every torrent when added? Can I call it from the API? |
No this currently is implemented on the frontend using JavaScript. It cannot be invoked by any API on the qBittorrent backend. |
Being a complete novice, how do I add this great functionality? |
Select at least 2 items in the Content tab and Rename. Only available in WebUI if it's not clear. |
Use version >= 4.6.0. Right-click torrent > rename files. Or select >= 2 files in the Content tab. |
Would be nice to have help texts (the ones from description are good) as tooltips for input fields and checkboxes. I've found this PR via google when trying to understand how to use this feature. |
Closes #16239.
(Partially addresses #6961.)
The purpose of the PR is to enable users to bulk rename files on the WebUI.
Image Description: Renaming 200 config files using a named variable and the file enumeration variable
Search Options
Search Field: The text criteria to search for as either a plain text string or a regular expression.
Use Regular Expressions: When checked, the search field will be interpreted as an ECMAScript regular expression. If not then the search field will be interpreted as a plain text string.
Match all occurrences: When checked, all matches of text in the search field will be replaced with the replacement text. Otherwise, only the first instance will be replaced.
Case Sensitive: When checked, the text specified in the search field will be treated as case sensitive.
Replace Options
Replacement Field: The replacement field is what you want to replace any matches with.
Applies To:
Include Files: When checked, the search will apply to files regardless of any files that are checked
Include Folders: When checked, the search will apply to folders regardless of any folders are checked
Enumerate Files: Specifies the starting point for enumerating files. Files can be enumerated by specifying $d in the replacement field.
Additional Capabilities
Right clicking a folder will allow you to toggle all items underneath that folder.
Check
vs.Unchecked
is determined by the row you right clicked. i.e. if the row you right clicked isunchecked
then it will be markedchecked
and all child items will be markedchecked
as well.The Replacement Field has some special variables that can be used in the replacement field.
(?<mynamedgroup>myfilename)
$mynamedgroup
Variables can be escaped by passing
\
such as\$0
Specifying a
$
alone without escaping it will not have any effect on the outputDiscoverability and Convenience
A new context menu item was added to the Torrents Table to make the Multi-Rename feature more discoverable and convenient to access:
By default the Multi-Rename user interface will remember the settings of the last rename operation. The following fields will be remembered:
Search
,Use Regex
,Match All Occurrences
,Case Sensitive
,Replace
,Applies To
,Include Files
,Include Folders
,Enumerate File Count
, andReplacement Operation
. This setting can be turned off by unchecking theRemember Multi-Rename settings
checkbox: