uProcess - the bridge between uTorrent and Sickbeard

If you've made an extra_script, made a 3rd party tool, or just added some functionality in a fork you can post about it here.

uProcess - the bridge between uTorrent and Sickbeard

Postby jkaberg » Mon May 13, 2013 10:29 am

uProcess
a tiny python post processer for uTorrent

About
I initially made uProcess to be a "learn by doing" project, but has this far been proven a good utility to automate downloads using uTorrent. Feel free to fork me, make changes and what not :-)

The project is located at Github

Features
  • Extract downloaded content - List of supported archives
  • Move, copy or (hard)link files that doesn't need extraction
  • Multi OS compatible (Windows, Linux, OSX)
  • Optionally calls CouchPotato or Sickbbeard when done (for additional post-processing)

Requirements

Good to know
  • For uProcess to be able to send torrents containing movies to CouchPotato or series to Sickbeard you need to match the torrent label you set in CouchPotato/Sickbeard with the one's you set in config.cfg (eg. in Couchpotato you set label to "movie" in the uTorrent downloader, then in the config.cfg under [Couchpotato] where it says label =, make it so: label = movie)
  • Links doesn't work cross partition/hard drive, use the copy or move option instead
  • uProcess ONLY works with uTorrent as its heavily dependant on uTorrents Web UI API

Usage
  1. Make sure you've installed uTorrent and Python correctly
  2. Grab uProcess here
  3. Extract uProcess to any location, in this example C:\Downloaders\uProcess
  4. Setup uTorrent to use Web UI (Options->Preferences->Advanced->Web UI), note down user/password and listening port
  5. Edit the config.cfg file in C:\Downloaders\uProcess to your preferences
  6. Goto uTorrent again, in Options->Preferences->Advanced->Run Program, where it says "run this program when torrent finishes" add: C:\Python27\pythonw.exe C:\Downloaders\uProcess\uProcess.py "%D" "%I"
  7. DONE! ;)

Not working!?
  • First off, check the log file located in the uProcess directory (make sure you set debug = true in config.cfg, and then run uProcess again)
  • If that didn't help, create an ticket over at the issue tracker
Last edited by jkaberg on Tue Jun 11, 2013 12:58 am, edited 3 times in total.
jkaberg
 
Posts: 31
Joined: Mon May 13, 2013 10:26 am

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby thatguy188 » Sun May 19, 2013 2:26 pm

I am so checking this out in a minute. Most of my shows download as .r00 etc it's a real pain!
thatguy188
 
Posts: 8
Joined: Sun May 19, 2013 2:09 pm

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby thatguy188 » Sun May 19, 2013 3:05 pm

Here is what I get. I do have 7-Zip in my system variables. Also it moves the file into a "uTorrent/Torrent Name/Torrent Name/files" directory .... so I guess im a bit lost, lol.

Code: Select all
May-19 17:01:09 INFO     uProcess :: Config loaded: C:\uProcess-master\config.cfg
May-19 17:01:09 INFO     uProcess :: Creating destination: C:\Torrents\uTorrent\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD
May-19 17:01:09 INFO     uProcess :: Moving file C:\Torrents\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD\kitchen.nightmares.us.s05e14.charlies.ws.pdtv.xvid-2hd.nfo to C:\Torrents\uTorrent\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD\kitchen.nightmares.us.s05e14.charlies.ws.pdtv.xvid-2hd.nfo
May-19 17:01:09 INFO     uProcess :: Extracting C:\Torrents\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD\kitchen.nightmares.us.s05e14.charlies.ws.pdtv.xvid-2hd.rar to C:\Torrents\uTorrent\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD
May-19 17:01:09 ERROR    uProcess :: Unable to execute 7-zip, is the 7-zip directory in your system variables?
May-19 17:01:09 ERROR    [Error 2] The system cannot find the file specified
Traceback (most recent call last):
  File "C:\uProcess-master\uProcess.py", line 60, in extractFile
    subprocess.call(['7z', 'x', compressedFile, '-aos', '-o' + outputDestination], stdout=FNULL, stderr=subprocess.STDOUT)
  File "C:\Python27\lib\subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
May-19 17:01:09 ERROR    uProcess :: One or more variables are missing
May-19 17:01:09 ERROR    [Error 2] The system cannot find the file specified
Traceback (most recent call last):
  File "C:\uProcess-master\uProcess.py", line 281, in <module>
    main(inputDirectory, inputName, inputHash, inputLabel)
  File "C:\uProcess-master\uProcess.py", line 202, in main
    extractFile(inputFile, outputDestination)
  File "C:\uProcess-master\uProcess.py", line 60, in extractFile
    subprocess.call(['7z', 'x', compressedFile, '-aos', '-o' + outputDestination], stdout=FNULL, stderr=subprocess.STDOUT)
  File "C:\Python27\lib\subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
thatguy188
 
Posts: 8
Joined: Sun May 19, 2013 2:09 pm

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby jkaberg » Mon May 20, 2013 3:04 pm

thatguy188 wrote:Here is what I get. I do have 7-Zip in my system variables. Also it moves the file into a "uTorrent/Torrent Name/Torrent Name/files" directory .... so I guess im a bit lost, lol.

Code: Select all
May-19 17:01:09 INFO     uProcess :: Config loaded: C:\uProcess-master\config.cfg
May-19 17:01:09 INFO     uProcess :: Creating destination: C:\Torrents\uTorrent\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD
May-19 17:01:09 INFO     uProcess :: Moving file C:\Torrents\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD\kitchen.nightmares.us.s05e14.charlies.ws.pdtv.xvid-2hd.nfo to C:\Torrents\uTorrent\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD\kitchen.nightmares.us.s05e14.charlies.ws.pdtv.xvid-2hd.nfo
May-19 17:01:09 INFO     uProcess :: Extracting C:\Torrents\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD\kitchen.nightmares.us.s05e14.charlies.ws.pdtv.xvid-2hd.rar to C:\Torrents\uTorrent\Kitchen.Nightmares.US.S05E14.Charlies.WS.PDTV.XviD-2HD
May-19 17:01:09 ERROR    uProcess :: Unable to execute 7-zip, is the 7-zip directory in your system variables?
May-19 17:01:09 ERROR    [Error 2] The system cannot find the file specified
Traceback (most recent call last):
  File "C:\uProcess-master\uProcess.py", line 60, in extractFile
    subprocess.call(['7z', 'x', compressedFile, '-aos', '-o' + outputDestination], stdout=FNULL, stderr=subprocess.STDOUT)
  File "C:\Python27\lib\subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
May-19 17:01:09 ERROR    uProcess :: One or more variables are missing
May-19 17:01:09 ERROR    [Error 2] The system cannot find the file specified
Traceback (most recent call last):
  File "C:\uProcess-master\uProcess.py", line 281, in <module>
    main(inputDirectory, inputName, inputHash, inputLabel)
  File "C:\uProcess-master\uProcess.py", line 202, in main
    extractFile(inputFile, outputDestination)
  File "C:\uProcess-master\uProcess.py", line 60, in extractFile
    subprocess.call(['7z', 'x', compressedFile, '-aos', '-o' + outputDestination], stdout=FNULL, stderr=subprocess.STDOUT)
  File "C:\Python27\lib\subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified


Your PATH variables please? (just type echo %path:;=&echo.% in your console and paste whatever you get here), output should be something like this (probably more lines):
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\7-Zip
C:\Python27


Also paste your config.cfg here ;)

Small fix for users using (hard)links @ github
jkaberg
 
Posts: 31
Joined: Mon May 13, 2013 10:26 am

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby jkaberg » Wed May 22, 2013 1:48 am

New update - uProcess doesn't use 7-zip anymore (but instead py-unrar2), which should make it alot less of a hassle to setup and more multi-platform compatible

Full change log here
jkaberg
 
Posts: 31
Joined: Mon May 13, 2013 10:26 am

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby hellow » Wed May 22, 2013 2:13 pm

Looks very cool! Any chance you will add support for copy in addtion to link and move. In my case i have a nas that i cant link on, on window you can only link on the same hdd.
hellow
 
Posts: 65
Joined: Sun Oct 09, 2011 3:44 pm

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby jkaberg » Wed May 22, 2013 3:29 pm

hellow wrote:Looks very cool! Any chance you will add support for copy in addtion to link and move. In my case i have a nas that i cant link on, on window you can only link on the same hdd.


It already does this, possible values are copy,move and link ;)
jkaberg
 
Posts: 31
Joined: Mon May 13, 2013 10:26 am

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby fireflash » Sat Jun 01, 2013 10:15 pm

This looks promising, except for the fact it doesn't seem to run.. AT ALL. No log file, no info on the screen when I run it from command line. NOTHING.

Windows 7 x64, Python 2.7 installed. Shouldn't need much more than that but it just won't flinch.

Thinking about writing a batch file for uTorrent to run.

*EDIT*

Found the problem. What wasn't mentioned in any documentation was the fact you need to install pywin32 as the script relies on the win32file library.
fireflash
 
Posts: 3
Joined: Sat Apr 07, 2012 2:55 pm

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby jkaberg » Sun Jun 02, 2013 4:01 am

Oh yeah sorry about that, will update the instructions

EDIT: Changed from win32file to ctypes, so one less dependency to install :)
jkaberg
 
Posts: 31
Joined: Mon May 13, 2013 10:26 am

Re: uProcess - the bridge between uTorrent and Sickbeard

Postby Purgid » Mon Jun 10, 2013 9:27 am

Hey jkaberg

This looks like a cool program, will have to try it out when I get home tonight.

Can you explain the difference between this and, say, using NZBtoMedia for full post-processing?

Do you have any tips and tricks specifically for using your program, and keeping everything nice and clean so that uTorrent will continue seeding the original download, and SB/CP don't have too much trouble post-processing?

Can't wait to hear back from you, and put this thing into action.

Cheers,
Matt
Purgid
 
Posts: 28
Joined: Sat Jul 28, 2012 11:09 am

Next

Return to Mobile Apps, Extra Scripts, Supplementary Tools

Who is online

Users browsing this forum: No registered users and 4 guests

cron