Unpack / Unrar Completed torrents

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

Unpack / Unrar Completed torrents

Postby scottygood88 » Wed Jul 25, 2018 11:01 am

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

Postby sallysensation » Wed Jul 25, 2018 12:51 pm

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

Postby scottygood88 » Wed Jul 25, 2018 10:46 pm

ok mine is doing the same as yours now! i cannot find the log? and no unpacking.

ngllgn
Posts: 19
Joined: Sun Nov 18, 2007 8:56 pm

Re: Unpack / Unrar Completed torrents

Postby ngllgn » Sat Jul 28, 2018 7:27 pm

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

Postby sallysensation » Sat Nov 10, 2018 9:02 pm

Anyone ever get this working? I cannot figure it out.

Alana182
Posts: 1
Joined: Mon Oct 29, 2018 11:03 am

Re: Unpack / Unrar Completed torrents

Postby Alana182 » Tue Dec 25, 2018 7:48 am

(1) Extract the downloaded zip to some folder.
(2) If your unRAR.exe file is in different folder than C:\Program Files\WinRAR , open the .config file and change the AppSettings key "WinRAR_Path" to correct folder.
(3) Go to uTorrent \ Options \ Preferences \ Advanced \ Run Program and change the field "Run this program when a torrent changes state" to:
<folder you extracted the files>\uTorrentExtractor.exe -s "%S" -d "%D" -l "%L" -p "%P" -k "%K" -n "%N"

BTW, if the path to the uTorrentExtractor.exe contains spaces, be sure to add quotation marks around it.

killemov
Posts: 392
Joined: Sat Jul 31, 2010 5:04 pm

Re: Unpack / Unrar Completed torrents

Postby killemov » Fri Jan 18, 2019 1:00 pm

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.

Jeremiah5
Posts: 1
Joined: Fri Mar 29, 2019 5:51 am

Re: Unpack / Unrar Completed torrents

Postby Jeremiah5 » Thu Apr 11, 2019 4:58 am

Hello.

I am looking at your script.. It seems very promising!!!

I would reall need two requests.

1.) Expand RAR/ZIPS in the same folder at downloaded!
Ex. /usb1/FilmA/file.rar, file.r01 ... into /usb1/TTRockStars/FilmA/file.avi

2.) Delete RAR/ZIP files after succesfull unrar/unzip.


Return to “Support”