Unpack / Unrar Completed torrents

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
scottygood88
Posts: 2
Joined: Wed Jul 25, 2018 10:21 am

Unpack / Unrar Completed torrents

Post by scottygood88 »

Hi All,

Im extremely new to this, running transmission 2.94 on my qnap.

I want to unpack/unrar files once they are completed AND keep the original file for seeding.

After googling for hours, ive found the below code.

#!/bin/bash
find /$TR_TORRENT_DIR/$TR_TORRENT_NAME -name "*.rar" -execdir unrar e -o- "{}" \;

then to 'stop' tranmission and open the settings.json file via WINSP and enter in at the bottom;

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/path/to/where/you/saved/the/script",

which looks like this :

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/share/CACHEDEV1_DATA/.qpkg/QTransmission/etc/unrar.sh",

i click save, then 'start' transmission, when i do this, it cannot connect back to transmission unless i remove what i added in the .json file?

Can someone please help me?

Cheers,
Scott
sallysensation
Posts: 16
Joined: Wed Nov 30, 2016 1:41 pm

Re: Unpack / Unrar Completed torrents

Post by sallysensation »

I struggled, but eventually got it working with 2.92. This is the thread that helped:

viewtopic.php?f=2&t=18283

Unfortunately, I updated to 2.94 and I can't get it working again. I'm not having the same trouble you're having. Mine simply is not unpacking the rar file. It's not creating a log where the script says to put it, so that makes me wonder if the script is ever being called. In that case, maybe the transmission settings.json is not being read properly. Any thoughts would be appreciated.
scottygood88
Posts: 2
Joined: Wed Jul 25, 2018 10:21 am

Re: Unpack / Unrar Completed torrents

Post by scottygood88 »

ok mine is doing the same as yours now! i cannot find the log? and no unpacking.
ngllgn
Posts: 20
Joined: Sun Nov 18, 2007 8:56 pm

Re: Unpack / Unrar Completed torrents

Post by ngllgn »

I cannot comment on your unpacking problem as I use The Unarchiver and Stuffit Expander on a Mac.

The only workaround I can suggest is to duplicate the .rar file before unpacking it, retain the original packed file in the default torrent file, and move the copy to be unpacked to the folder of your choice.
sallysensation
Posts: 16
Joined: Wed Nov 30, 2016 1:41 pm

Re: Unpack / Unrar Completed torrents

Post by sallysensation »

Anyone ever get this working? I cannot figure it out.
killemov
Posts: 535
Joined: Sat Jul 31, 2010 5:04 pm

Re: Unpack / Unrar Completed torrents

Post by killemov »

I have used this Unrar and cleanup script for many years on Debian on a Qnap device. Check it out and let me know if it works for you.
Post Reply