Unrar script for JUST the default download dir?

Discussion of Transmission that doesn't fit in the other categories
Post Reply
dexusno
Posts: 3
Joined: Tue Jan 31, 2012 10:28 pm

Unrar script for JUST the default download dir?

Post by dexusno »

Hi all!

I've set up some automation that results in all my tv-show and movie downloads end up in the default download destination "/transmission/data/".
I'd like to make or use an allready made script to unrar these to a destination dir.. e.g. "/transmission/media/".

BUT... All other torrent downloads.. e.g. the ones with another destination dir e.g. "/transmission/music/" should be left alone, and not expanded by the unrar script..

Any ideas if this is possible?

Best regards,

dexusno.
gunzip
Posts: 272
Joined: Wed May 05, 2010 2:12 am

Re: Unrar script for JUST the default download dir?

Post by gunzip »

you could try something like this..

Code: Select all

#!/bin/bash
if [ "$TR_TORRENT_DIR" = "/transmission/data" ]; then

   <insert unrar script here>

fi
unrar script only runs if torrent download directory is /transmission/data , otherwise it does nothing.
dexusno
Posts: 3
Joined: Tue Jan 31, 2012 10:28 pm

Re: Unrar script for JUST the default download dir?

Post by dexusno »

gunzip wrote:you could try something like this..

Code: Select all

#!/bin/bash
if [ "$TR_TORRENT_DIR" = "/transmission/data" ]; then

   <insert unrar script here>

fi
unrar script only runs if torrent download directory is /transmission/data , otherwise it does nothing.
I was wondering about the $TR_TORRENT_DIR string.. If it was pointing to the main torrent directory or the directory for each single torrent..
I will try implementing somehow.. All I need is for the unrar script to unrar the contents of the main download directory as the torrents are completed.. No cleanup, deleting or other stuff necessary.

Best regards,

dexusno
Post Reply