How would I go about automatically unraring files?

Linux specific questions, problems.
Post Reply
Roseysdaddy

How would I go about automatically unraring files?

Post by Roseysdaddy »

First off, I am very new to linux, but was able to setup Ubuntu server by using many tutorials and a whole lot of googling, but im still very much a noob.
I am running qbitTorrent-nox and it has an option for "Run an external program on torrent completion" but I don't know how to write the correct commands.

Any help in the right direction would be very much appreciated.
grrratch

Re: How would I go about automatically unraring files?

Post by grrratch »

This is how I did it, please let me know if you find/found a better way.

Auto un-rar using Ubuntu 12.4 and Qbittorrent 3.0.9
Open a terminal windows

Install unrar.
apt-get install unrar

Go into: Qbittorrent -> Options ->Download.
[tick] Run an external program on torrent completion
unrar x r %f\%n\*.rar %f\%n\
Roseysdaddy

Re: How would I go about automatically unraring files?

Post by Roseysdaddy »

Im using qbittorrent-nox on an Ubuntu server 14.04 install. Im trying to get the program to run unrar on torrents but it doesn't work. The command:

sudo unrar x -r %f/%n/*.rar /mnt/

works when typed in the command prompt and I can enter a sudo password, but obviously I cant do that within the program.

I guess basically, how do I either give qbittorrent-nox root rights or make unrar not require them?
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: How would I go about automatically unraring files?

Post by sledgehammer_999 »

Why do you need sudo? are you running under root account? If yes, then that is a very bad idea.
ben2talk

Re: How would I go about automatically unraring files?

Post by ben2talk »

Ok, bumping a very old thread here... I had this working a while ago, but I can't get it to work on my new install.

I ran qbittorrent in terminal to get an output, I have a multi-part rar file, usually I have to extract manually from *.r00

If I open a terminal in the download directory, I can run

Code: Select all

unrar e *r00
So I put that command in qbittorrent. I feel confident this is the command that I had before...

Then I deleted the torrent, re-add the torrent and copy the rar files - omitting nfo and sfv files, re-check the torrent (so it's 99.8%) then resume.

When the torrent is complete, in terminal I see the message:
❯ qbittorrent
UNRAR 6.12 freeware Copyright (c) 1993-2022 Alexander Roshal
No files to extract

Hmmm. That's rather annoying!!! Any ideas?
ben2talk

Re: How would I go about automatically unraring files?

Post by ben2talk »

Ok, well I solved this - rg in the Timeshift archives...

Code: Select all

~/.config/qBittorrent/qBittorrent.conf

Code: Select all

[AutoRun]
enabled=true
program=7z x \"%F/*.rar\" -o\"%F/\"
Post Reply