Renaming the default folder of a torrent while adding
Posted: 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?
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?