My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
How_to_setup_this_script_with_Transmission  

Featured, Phase-Deploy
Updated Dec 2, 2012 by addicted...@gmail.com

Through Transmission interface

In the transmission GUI, enable the "call script when torrent is completed" option and select the path to the torrentexpander.sh script.

You're done !

Through text editor

You can also do it the command line way by editing Transmission's settings file, you will find it in:

  • /$HOME/.config/Transmission/settings.json
  • /share/.transmission/settings.json
and editing those two lines :

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/path/to/torrentexpander.sh $TR_TORRENT_DIR/$TR_TORRENT_NAME"

With some old versions of Transmission, you may need to use this line instead in Transmission's settings file :

"script-torrent-done-filename": "/path/to/torrentexpander.sh"

Troubleshooting

Transmission is sometimes run by a custom user, leading with some issues when transmission is used to trigger torrentexpander. There are two ways to solve that

Solving permissions issues the quick and dirty way

By default the transmission daemon runs as debian-transmission on debian or Ubuntu

For reference, this is changed in the following location. sudo nano /etc/init.d/transmission-daemon

USER=your_login_here

or sometimes

USERNAME=your_login_here

Solving permissions issues the recommended way

First, cd to the desired folder and create a folder for Transmission to use: cd /home/user/Downloads mkdir transmission cd transmission mkdir completed incomplete torrents

Then, add the username to the group debian-transmission:

sudo usermod -a -G debian-transmission user

This will add debian-transmission as a secondary group to the account user, resulting in access to both Transmission and user. Then, change the ownership of the Transmission download folders to the group debian-transmission:

sudo chgrp -R debian-transmission /home/user/Downloads/transmission

Next, change the permissions for the transmission download folders to allow read, write, and execute for Transmission and your_login

sudo chmod -R 775 /home/user/Downloads/transmission

Comment by graphict...@gmail.com, Aug 24, 2012

This seems to work with transmission cli but I can't get it to work with transmission-daemon.

Comment by jvnd...@gmail.com, Feb 5, 2013

It works for transmission-daemon when the shell script arguments are ommited.

Comment by martin.s...@gmail.com, Apr 10, 2013

It is possible to access the env.variables TR_TORRENT_DIR, TR_TIME_LOCALTIME, TR_TORRENT_ID, TR_TORRENT_HASH, TR_APP_VERSION, and TR_TORRENT_NAME in transmission-daemon (check output of env if new variables are added). If you call the script with any arguments, it seems transmission-daemon think the path of the script contains spaces.

Comment by tour...@gmail.com, Jan 24, 2014

Very thorough script, but for some reason I can't get it to work under Debian 7 32bit. I've been calling the script directly, and it processes the torrent all the way to creating the temp directory, and then starting the unrar extraction process however that's where it fails. Here is a sample error:

Step 1 : Expanding / moving content of the torrent

unrar 0.0.1 Copyright (C) 2004 Ben Asselstine, Jeroen Dekkers

Extracting from /home/wwwroot/path/torrentfolder/torrentfile.rar

Extracting torrentfile.mp4 Failed 1 Failed mv: cannot stat `/home/wwwroot/torrents/torrentexpander_temp/torrentfolder': No such file or directory That's All Folks

I know you didn't create this script to give support lol but I would appreciate your time if you could just point me in the right direction

...I've tried many things,nothing helped, I thought it was a permissions issue but those look fine

thanks

Comment by bravohac...@gmail.com, Apr 6, 2015

how to use in windows ?

Powered by Google Project Hosting