Author Topic: Run The Unarchiver in every torrent that finishes  (Read 3176 times)

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Run The Unarchiver in every torrent that finishes
« on: December 07, 2015, 04:46:29 pm »
Hello,

I am on MAC with TheUnarchiver already installed (and the last version of qbittorrent) and i want to know how can i run it every time a torrent finishes. Thanks

I want to automatically unrar every torrent that finishes.
« Last Edit: December 07, 2015, 05:15:23 pm by willpower »

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #1 on: December 07, 2015, 05:33:33 pm »
Options -> Downloads -> Run program (assuming it exists in MAC versions)
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #2 on: December 07, 2015, 05:42:53 pm »
But what do i have to type there? I don't know code :/


something like this maybe?

Code: [Select]
run the_unarchiver /%f/%n/*.rar /%f/%n/
but i am not sure :/
« Last Edit: December 07, 2015, 05:46:56 pm by willpower »

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #3 on: December 07, 2015, 07:08:43 pm »
The parameters are case sensitive so should be in uppercase, and if there may be spaces in the text the parameter should be wrapped in quote marks, ie "%D"

But as to whether they are in the correct order for your application I have no idea, do some 'dummy runs' of directing the output to a text file so you can see what is being sent to the application.

Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #4 on: December 07, 2015, 07:27:14 pm »
Thank you.


Can i put everything inside "" ?

Like this:

Code: [Select]
open "/%F/%N/*.rar"
This makes any sense?
Should i use / or \ ?


(i am hoping this will open .rar file with mac default app: the unarchiver)

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #5 on: December 07, 2015, 07:33:41 pm »
Quote
Can i put everything inside

Absolutely NOT!

Spaces are a command line delimiter, so are necessary between the parameters.
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #6 on: December 07, 2015, 07:41:14 pm »
so, should i use this?

Code: [Select]
open "/%F/%N/*.rar"
or this?

Code: [Select]
open /"%F"/"%N"/"*.rar"
or this?

Code: [Select]
open \"%F"\"%N"\"*.rar"

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #7 on: December 07, 2015, 08:28:44 pm »
Bear in mind that %N (torrent name) may NOT relate to a valid path.

On MAC OS path separators are '/' so "%D/" would be correct
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #8 on: December 07, 2015, 08:36:28 pm »
thank you

so, maybe this is the correct form?


Code: [Select]
open "%D"/*.rar

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #9 on: December 07, 2015, 08:52:01 pm »
"%D/*.rar"
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #10 on: December 07, 2015, 09:24:48 pm »
it doesn't work... nothing happens :(

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #11 on: December 08, 2015, 07:29:48 am »
What did writing to a text file show? CLI is

echo "%1" "%2" "%3" > path-to-a-text-file

(replace 1,2 & 3 with the actual parameters you expect to use)

I have no idea what "The Unarchiver" is, so have no clue as to what the command line structure should be.
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #12 on: December 08, 2015, 04:48:46 pm »
i did this:

Code: [Select]
echo "%D/*.rar" > /Users/willpower/Desktop/qbt.txt
but nothing happened... :/


The Unarchiver is my default compress/decompress files app.

ciaobaby

  • Forum addict
  • ****
  • Posts: 2771
  • Karma: +98/-25
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Run The Unarchiver in every torrent that finishes
« Reply #13 on: December 08, 2015, 06:04:34 pm »
Applications and scripts do not normally have write permissions to the desktop on Linux and Mac.
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

willpower

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run The Unarchiver in every torrent that finishes
« Reply #14 on: December 08, 2015, 09:18:55 pm »
i tried adding 'sudo' before, but nothing happens too.. :/

nobody here uses a Mac?