qBittorrent
qBittorrent copied to clipboard
Bulk renaming with find and replace
I really like the fact that you can rename the files and folders before you download them, but it would be so much useful if this thing could be done to multiple files at once. For example, I download quite a lot of TV shows in batches, and all of the files in the batch have extra information in their names, like video resolution, subtitle provider etc. and having to remove all of those manually for an entire season is quite annoying, and I'm pretty sure I am not the only one with the problem. But a "find & replace" thing could solve this issue. Just type in what you want to find in a text box and with what to replace it in another one. For example, Deluge has a plug-in for this and it's nice, but overall I like qBittorrent more, so I keep changing my mind over which one to use. You could also include thing like placeholders. For example, a placeholder for the parent folder's name, so you could name each file after that, and one for incrementing numbers, so you could add the episode name at each file etc.
I hope you will consider this thing. Thank you very much :)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
qBT already uses Boost Libs, Boost::RegEx might be a good solution here?
IMO a solution that is easier to code and more powerful, is to do as vidir. Print the torrent's list of file names to a temporary file, and open that file in the default text editor. Then, the user can make whatever changes they want to the file names, and when they save and exit, propagate those changes to qbittorrent's file roster for that torrent. If the user has a text editor capable of find/replace, then this method will work for OP's use case.
Alternatively:
An action to scan the folder containing the torrent's files for filename changes, and propagate those changes to qbittorrent's file roster would work just as well.
And I like the ability to chose my own text-editor. good idea @FlyingWombat
I made a video about it: https://www.youtube.com/watch?v=449BCf8mk18
Note: you can't change the name of the file directly in the .torrent file, as far I'm aware of. Doing it to .fastresume looks like a useful feature. Depending on the number of files, is a lot faster than manually one by one renaming.
note2: .fastresume name = hash
note3: If there is no mapped files, just change the name of the root folder (inside qbit), it will map the files
Any questions or suggestions, just reply. cya
This would be amazingly useful for me, personally. My NAS (WD MyCloud) processes incoming media files to create thumbnails, and it identifies them by extension; I'd love a way to select all the images in a torrent and quickly add another extension to them (file.jpg -> file.jpg.noprocess). Yes, this is not a problem with qbittorrent, but it would solve my issue.
An action to scan the folder containing the torrent's files for filename changes, and propagate those changes to qbittorrent's file roster would work just as well.
I like this idea.
IMO a solution that is easier to code and more powerful, is to do as
vidir. Print the torrent's list of file names to a temporary file, and open that file in the default text editor. Then, the user can make whatever changes they want to the file names, and when they save and exit, propagate those changes to qbittorrent's file roster for that torrent. If the user has a text editor capable of find/replace, then this method will work for OP's use case.
I like this idea
I started working on this feature but only for the WebUI: #16239
Why did you choose this implementation over what was suggested in https://github.com/qbittorrent/qBittorrent/issues/6961#issuecomment-511263650? IMO that one is more versatile.
primarily because I wanted a way to do this in the browser and have the changes be visible in real-time before actually committing to the bulk rename. additionally I am not very familiar with vi and I think the solution path I chose will be more intuitive to end users who don't have vi experience
Despite the name of the script, vidir does not actually require usage of vi. It just creates a temporary file with a list of filenames, opens it in whatever text editor you want. There's no reason at all that the feature couldn't be easy for anyone to use, whether you're a tech-illiterate Windows user who only knows how to use notepad or a Linux power user using some obscure text editor nobody's ever heard of. Especially as it would, I assume, be a bespoke implementation and not actually be built on top of vidir.
seems like this would make a good candidate for a truly headless qbittorrent instance i.e. no web interface
Any reason why multi-file renaming was only added to WebUI?
Any reason why multi-file renaming was only added to WebUI?
No one has provided such functionality (in an acceptable form) for a desktop application.