Page 1 of 1

Unrar script for JUST the default download dir?

Posted: Wed Feb 01, 2012 12:08 am
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.

Re: Unrar script for JUST the default download dir?

Posted: Wed Feb 01, 2012 4:39 am
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.

Re: Unrar script for JUST the default download dir?

Posted: Wed Feb 01, 2012 9:07 am
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