Renaming the default folder of a torrent while adding

Discussion of Transmission that doesn't fit in the other categories
Post Reply
someuser
Posts: 2
Joined: Sat Feb 08, 2020 3:21 pm

Renaming the default folder of a torrent while adding

Post by someuser » 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?

Fender6
Posts: 1
Joined: Wed Feb 19, 2020 12:42 pm

Re: Renaming the default folder of a torrent while adding

Post by Fender6 » Wed Feb 19, 2020 12:47 pm

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 walmartone

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?
Hi!

Where Transmission thinks the device is just the size of the SD-partition not the USB-Drive/Stick. I'm using a 32GB USB2.0 stick. How do I get Transmission to recognize it's size instead of running into the no space left-error? The files I'm downloading are stored on that mounted stick and not in the default folders, nor are the incomplete ones stored on the SD-card as well.
Last edited by Fender6 on Tue Apr 07, 2020 3:18 pm, edited 1 time in total.

killemov
Posts: 413
Joined: Sat Jul 31, 2010 5:04 pm

Re: Renaming the default folder of a torrent while adding

Post by killemov » Fri Feb 21, 2020 10:24 am

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?
There are two paths involved:
  • The download path that is either configured in Transmission or entered at download.
  • The folder path that is part of the torrent structure.
Changing the download path is usually safe, it does not have to be unique. Changing the path within the torrent structure comes with risk. In your case the show name is the download path and the season folder is part of the torrent structure. So if you have the first season of 10 TV shows they would all show as season01. Meaning there is no visual way to differentiate. There is a python based program called SickChill that helps you manage TV shows.

someuser
Posts: 2
Joined: Sat Feb 08, 2020 3:21 pm

Re: Renaming the default folder of a torrent while adding

Post by someuser » Fri Feb 21, 2020 2:05 pm

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.

Post Reply