taiga icon indicating copy to clipboard operation
taiga copied to clipboard

Customizing arguments passed to the custom torrent application

Open steinuil opened this issue 3 years ago • 4 comments

I have transmission-daemon running on a different computer, and if I select transmission-remote as the torrent client in the settings and try to add a torrent it just silently fails, because the correct host:port combination was not specified and the download path is not valid (because the download directory is shared to the host machine running Taiga through a SMB share, and on the machine running transmission-daemon it has a different root).

It would be useful to be able to customize the arguments passed to the application with a format string like the ones used for the RSS feed, so that I could write remotehost:9091 -a %torrent% -w /path/on/remote/machine, or use my own script to also handle the download dir path conversion. I think this would also solve #709.

(On my end I solved this by writing a batch script called transmission-remote.bat that only takes the argument specifying the torrent and passes it to the real transmission-remote.)

steinuil avatar Apr 14 '21 15:04 steinuil

i know its not real fix but you can switch to Electorrent. Works fine for me.

4zjata avatar May 02 '21 09:05 4zjata

@steinuil I know this issue is old, but would you be kind enough to share the code of your transmission-remote.bat if you still have it ? I too am struggling to find a way to use a remote torrent client with taiga. The Transmission Remote GUI programme do exactly that and allow for specifying local>remote path mapping, which work perfectly when I manually add a torrent from the GUI, but when I configure taiga to use it, the custom path is lost and revert to the default path defined in transmission

Noirvent avatar Jul 15 '22 00:07 Noirvent

@Noirvent sure, it is literally just a batch file that does what I wrote in the comment earlier.

"C:\Program Files\Transmission\transmission-remote.exe" "remotehost:9091" -a %2 -w "/path/on/remote/machine/Anime"

It will not do any path conversion and as you can see the download path is hardcoded.

steinuil avatar Jul 16 '22 02:07 steinuil

Thank you. I upgraded it to add path mapping because I can't bother to manually move the files after download. Here's the script

@rem transmission-remote.bat
setlocal enableDelayedExpansion
set _remotesrv=lliira.home.eldhar.com:9091
set _localpath=P:\Animes\
set _remotepath=/media/Animes/
set _torrent=%2
set _torrentdest=%4
set _mappedpath=!_torrentdest:%_localpath%=%_remotepath%!
set _mappedpath=%_mappedpath:\=/%
"C:\Program Files\Transmission\transmission-remote.exe" %_remotesrv% -a %_torrent%  -w %_mappedpath%

So now here's my setup, in case someone is looking for the same thing:

My windows PC with Taiga has a SMB share from my server mapped on P:\ drive. Taiga is configured to use P:\Animes (and as library folder) as download location if no folder set, and create subfolder checked. Bittorrent client is custom and point to the transmission-remote.bat script.

A linux storage server with Transmission, Plex and otherr services. My animes are stored in /media/Animes/, which is then shared via Samba. Important is to set the correct mask for new files (0664) and directories (0774) in the samba share because Transmission need to have write rights in the subfolders created by Taiga, like this:

#/etc/samba/smb.conf
[...]
[PLEX]
   comment = Plex Media Server files
   path = /media
   browsable = yes
   guest ok = no
   read only = no
   valid users = noirvent
   create mask = 0664
   directory mask = 0774

That way I can use Taiga to manage my lists and animes folders, but let my server handle the downloading alongside my other torrents (because Taiga>>>Sonarr/Radarr in regard to animes) and watch my animes using plex on all my devices. It was absurd to have 2 bittorrent client running at the same time, one for animes and the other for everything else.

Noirvent avatar Jul 17 '22 01:07 Noirvent