How to use rutorrent: Unpack Plugin

shwetha17

Member
May 24, 2018
785
0
16
The Unpack plugin lets you unzip and unrar torrent files. This plugin is fairly easy to use, but i HIGHLY recommend installing the _getdir plugin. _getdir, if you do not already know, allows you to pick a directory in a similar fashion to how you would in a normal computer program. This plugin will work without _getdir, but you will have to type in the destination path manually.

Unpack has 2 modes, a manual mode which allows you to pick a torrent and un{zip,rar} it, or an automatic mode. First, i will explain the manual mode.

There are 2 ways to launch the manual unpack. The first method is to simply right click on a seeding torrent, which brings up a menu. From this menu, select unpack (it's the last option, as shown in this screenshot)


The other method to launch the manual unpack is to find a zip file or rar file in the "Files" tab, right click it, and select "unpack", as shown here:




Either of these 2 methods are valid, and have the same results. When you do this, you should have a new "unpack" dialog box pop up which is show here:



If you wish to unpack the data to the dir which the files are in, just click "ok" If you wish to specify a dir other than the dir which the rar/zip files are in, click on the _getdir button and pick a dir, as shown in this screenshot:



After you've done that, just click "OK" and you should get a message in the logger informing you that unpack has started. This method works for multiple piece rar files as well, so long as all the pieces are in the dir. When unpack has finshed, you should receive another log message saying so, as shown here:




Now for the automatic unpack settings. With the automatic unpack setup, rutorrent will unpack all rar/zip files when they are finished downloading. It can unpack them all to one directory, or it can create a directory structure based on labels and/or name of the torrent.

To set this up, fist open your SETTINGS submenu by clicking on the gear:



Then select "unpack" from the list. Notice how it has a check box to "enable autounpacking" Check this.

auto01.png


Next, set the dir you wish to have stuff unpack to. It can be any directory you have permissions to, for this example i've created a "unpack" directory in my path.

(note: _getdir helps here)
auto02.png


Notice you have 2 other options: "Torrent Label" and "Torrent Name" these create directories for the unpacked items. If you select both, you'll end up with a directory structure like this:

struct.png


When you're done, it would look something like this:



Of course, you can choose not to use "Torrent Label" or "Torrent Name" if you like.

After this, just click ok, and now all new torrents will unpack upon completion.
 

jith45

Member
May 25, 2018
960
0
16
Hello,
thanks for this great feature.

Is there a way to give another command after finished unpacking?
What I'd like to "have" is that the directory created just moves to /home/user/ after all unpacking is done, would it be possible?
 

simur612

Member
May 25, 2018
879
0
16
this is a great addon, quick question.
is it possible to set it to work with only 1 rss feed automatically?
i dont want to unpack everything i download, just what i download from one feed
 

simur612

Member
May 25, 2018
879
0
16
I'd like to +1 samuli's request to run a specific script after unpack has finished. It is for organization purposes: Unpack right now can either auto-unpack to the torrent's current directory, or it can unpack to one specific directory. I want to automate things a step further, and put the unpacked file someplace else based on some conditions (usually name, but sometimes size, etc).

I currently have Unpack auto-unpacking to a specific directory, and I have a cron job that runs every 10 minutes and runs my script to check that directory for new content, then moves it accordingly. This means there's potentially a 10 minute delay in moving the file, or the possibility that the file is being unpacked when the cron job triggers. Obviously these are both rather trivial nuisances and I've been working around them. Still, I think this would be a very useful addition : ).

I've tested with a "system.method.set_key = event.download.finished" event in .rtorrent.rc, but this executes before Unpack, so is not useful. An alternative to expanding the Unpack plugin would be the ability to configure a custom "system.method.set_key = event.download.finished" event such that it would execute after Unpack was called. Is there a way to do this that I'm just not aware of? (Entirely possible; I'm not particularly strong at the .rtorrent.rc scripting syntax).

Thanks. Keep up the awesomeness.
 

randac56

Member
May 25, 2018
915
0
16
You may write statement, that will be runned after unpack start (start! not finish!). For that you must set it's label correctly. It must be > unpacks label.
For unpack we have

system.method.set_key = event.download.finished,unpack+username,...

As result, you must write something like

system.method.set_key = event.download.finished,zzz_afterunpack,...
 

lisas4567

Member
May 25, 2018
773
0
16
Hello,
I have a quick question. I ask for a way that some file "group-abc.avi" in a directory gets automatical the name of the folder...

After the "Unpack" Plugin has finished unpacking a .rar to "Movie.Source-Group/Movie.Source-Group/group-abc.avi" my problem is, that I have to do it everytime manually. Exist any chance that I can modify this option to rename the .avi-File inside the Directory to the name of the folder mechanical, after unraring is finished? Hopefully you will built this feature in a new plugin-version.

lg
 

saroos1

Member
May 25, 2018
718
0
16
Is there a way to optionally copy non-rar files to the unpack folder? For example, most of my .rar's come with a .nfo in the same folder. Right now when I unpack, I end up with only the video file. It'd be nice to have a check box that will copy the .nfo also.
 

simur612

Member
May 25, 2018
879
0
16
Enable unpacking if torrents label matches filter /.*/

Will that unpack any and all torrents? This is what I want.

Also what is the usage for the filters?
 

saroos1

Member
May 25, 2018
718
0
16
the directory wont hold the path everytime i reopen it i find the path i gave it gone nd it exract in the default directory ..
any solution ??
 

simur612

Member
May 25, 2018
879
0
16
How can i unpack files " name.001" i have files with name.001 - name.080 for example. And i can not unpack it. On my PC i can do it in total commader.

Thank you for help.
 

randac56

Member
May 25, 2018
915
0
16
anybody know how if i can prevent the auto unpack from rewriting the file if it already exists ??