I'm using this client for Windows to control transmission running on my raspberry pi: https://github.com/transmission-remote-gui
However, I don't add my torrents through this client. I have written a python script which automatically add torrents I save in a particular folder on my shared drive. The python script calls the transmission-remote command line with -a argument to add torrents.
While adding torrents from the GUI client, there is an option called save as. This renames the default folder of the torrent. So if the torrent's files are stored in a folder, this option will change the name to whatever I want. I want to use this functionality in my python script. But I'm not able to find the options for this.
Basically what I want to do is, if the torrent has a TV show with files structured like this:
tv.show.name.s01/s01e01.mkv
tv.show.name.s01/s01e02.mkv
I want to save it in the folder like this:
tv.show.name/season01/s01e01.mkv
tv.show.name/season01/s01e02.mkv
However, currently if I specify the path using the -w argument as base_path/tv.show.name/season01, then the files get saved in base_path/tv.show.name/season01/tv.show.name.s01/s01e01.mkv
The original folder name is still used after the path specified by me using the -w argument.
How to achieve this using command line arguments?
Renaming the default folder of a torrent while adding
Re: Renaming the default folder of a torrent while adding
There are two paths involved:someuser wrote: ↑Sat Feb 08, 2020 3:42 pm I'm using this client for Windows to control transmission running on my raspberry pi: https://github.com/transmission-remote-gui
However, I don't add my torrents through this client. I have written a python script which automatically add torrents I save in a particular folder on my shared drive. The python script calls the transmission-remote command line with -a argument to add torrents.
While adding torrents from the GUI client, there is an option called save as. This renames the default folder of the torrent. So if the torrent's files are stored in a folder, this option will change the name to whatever I want. I want to use this functionality in my python script. But I'm not able to find the options for this.
Basically what I want to do is, if the torrent has a TV show with files structured like this:
tv.show.name.s01/s01e01.mkv
tv.show.name.s01/s01e02.mkv
I want to save it in the folder like this:
tv.show.name/season01/s01e01.mkv
tv.show.name/season01/s01e02.mkv
However, currently if I specify the path using the -w argument as base_path/tv.show.name/season01, then the files get saved in base_path/tv.show.name/season01/tv.show.name.s01/s01e01.mkv
The original folder name is still used after the path specified by me using the -w argument.
How to achieve this using command line arguments?
- The download path that is either configured in Transmission or entered at download.
- The folder path that is part of the torrent structure.
Re: Renaming the default folder of a torrent while adding
Thanks Killemov. I eventually switched to using the RPC interface through the python requests library. The rename option is available there, even though it happens only after adding and not at the time of adding the torrent. I was able to use that and achieve my objective.
-
- Posts: 1
- Joined: Fri Jul 24, 2020 1:09 pm
Re: Renaming the default folder of a torrent while adding
You can copy all files and folders to a new destination and rename them.