My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
PostProcessing  
How to set up post processing with SABnzbd+
Updated May 25, 2010 by midgetspy

Post Processing

Post Processing is for NEW DOWNLOADS only - do NOT post process your existing show dirs!

Post processing is the ability of Sick Beard to automatically rename your downloads and sort them into the proper folders. Without this you will need to manually copy them over and then re-scan the show directory to find the new episodes.

To set up post processing, first copy the contents of the autoProcessTV directory from your Sick Beard installation to your SABnzbd+ scripts folder (or set your scripts folder to the location of the autoProcessTV directory). Rename autoProcessTV.cfg.sample to simply autoProcessTV.cfg and open it in a text editor. Change the host, port, username, and password values to the appropriate settings for your Sick Beard server. Then set the appropriate script as your postprocessing script inside SABnzbd+/HellaNZB:

sabToSickbeard.py - linux/OSX SABnzbd+

sabToSickbeard.exe - Windows SABnzbd+

hellaToSickbeard.py - HellaNZB

Note: If your SABnzbd+ is running on a different PC than your Sick Beard you may need to enter your TV download dir into your Sick Beard settings so that Sick Beard knows how to find the SABnzbd+ downloads.

Note 2: You must disable SAB sorting to use Sick Beard post processing, all episodes should be being post-processed from a temporary download folder.

Post-Processing for download clients other than SABnzbd+

Newer versions of Sick Beard support automatic post-processing for clients that can't call the sabToSickbeard post-processing script after a download finishes. To enable this:

- Set your "TV Download Dir" to the location where your completed downloads are placed (NOT YOUR SORTED TV DIR!) - enable "Scan & Process TV Download Dir"

Comment by metaja...@gmail.com, Mar 10, 2010

OSX 10.5.X (Leopard) Tip: If you installed Python 2.6 using the .mpkg file from the official Python .dmg you need to edit sabToSickBeard.py to use python 2.6 otherwise it's default (/usr/bin/python) will not be able to load dependent modules when run from sabNZB.

svn diff:

Index: sabToSickBeard.py
===================================================================
--- sabToSickBeard.py	(revision 414)
+++ sabToSickBeard.py	(working copy)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/local/bin/python
Comment by jse...@gmail.com, May 4, 2010

remember you need to set the sickbeard category (Config, Episode Downloads, SABnzbd, Category) to TV as well as set the post processing in SAB (Config, Categories, TV) for the TV Category to the correct script. Hope that saves someone time.

Comment by parfitt...@gmail.com, Aug 30, 2010

Anyway i can move the whole folder rather than just moving the files. I want to keep the folder that is named after the nzb, plus all files inside it. This includes nfo and such, plus i don't create any meta data. Is this possible or can be added?

Comment by lyon.jos...@gmail.com, Aug 31, 2010

If you are trying to use sickbeard behind a reverse proxy (or just under a different web root), there is a critical comment that is missing from the documentation -- you must add a web_root variable into the autoProcessTV.cfg if you are using web_root in the config.ini.

The web_root parameter doesn't exist in the autoProcessTV.cfg.sample, so it's not apparent that it's needed, but it's called in the autoProcessTV.py file when sickbeard tries to post-process files from SAB.

Note: This applies to the alpha 2 source pulled from github on 8/30.

Comment by RNGam...@gmail.com, Sep 1, 2010

Just changed from running build 458 to running from source (in Windows) to get some of the more recent fixes. Perhaps a silly question: I don't see a "sabToSickBeard.exe" in the source. Should I keep running the old 458 exe or can I tell SABnzbd to run the .py file (in the source) for post-processing in Windows?

Comment by halfas...@gmail.com, Sep 21, 2010

Quick noob folder question: Have build461 on WinXP. SABnzbd+ TV sorting disabled. Default folder MEDIA. TV category goes to MEDIA\TV and script set to sabtoSickBeard.exe correctly. Sickbeard TV Dir is left blank. SB category set to TV.

For some reason, it downloads files to MEDIA and not to MEDIA\TV and then does not process them. Shouldn't it download and process from a temp folder? I think I'm missing a step.

Comment by Jas1...@gmail.com, Oct 2, 2010

I'm having trouble setting up sab to run sabtosickbeard.py I can get sabtosickbeard to work properly manually from the terminal (i'm running os x 10.6.4) but when sab is finished downloading a file sent from sickbeard it just puts it in sabs completed download folder. I have a category "tv" with sabtosickbeard.py set as the script. I'm not sure whats wrong

Comment by Jas1...@gmail.com, Oct 2, 2010

for some reason the file is added but the category won't be selected. If I select the tv category for that file it will download ,then I get an error "Exit(-1) Cannot run script /Applications/scripts/sabToSickBeard.py (More)"

Comment by Jas1...@gmail.com, Oct 2, 2010

I set nzb action to sabnzbd instead of blackhole , now the tv category is set by SB, but I still get "Exit(-1) Cannot run script /Applications/scripts/sabToSickBeard.py (More)" error

Comment by dropthes...@gmail.com, Oct 7, 2010

One thing that isn't mentioned here. As a new sabnzbd user, I didn't know I had to go into the Categories and set the sabToSickBeard script for the TV category.

Comment by j...@emocium.com, Nov 29, 2010

@Jas1612, try running the sabToSickBeard.py via a console and see what error it gives you, mine was solved with a simple ln -s /usr/bin/python2 /usr/bin/python

Comment by gerbertf...@gmail.com, Jan 16, 2011

Ok, the post processing isnt working for me on my windows 7 machine. In sabnzbd it says the following after using the sabtosickbeard.exe as script:

Code: Renaming file F:\downloads\TV\Survivor S18E07? 720p HDTV x264 ORENJi\survivor.s18e07.720p.hdtv.x264-orenji.mkv to F:\downloads\TV\Survivor S18E07? 720p HDTV x264 ORENJi\Survivor - S18E07? - One of Those 'Coach Moments'.mkv

After renaming the new file path is F:\downloads\TV\Survivor S18E07? 720p HDTV x264 ORENJi\Survivor - S18E07? - One of Those 'Coach Moments'.mkv

Destination folder for this episode: F:\Series\Survivor\Season 18

Moving file from F:\downloads\TV\Survivor S18E07? 720p HDTV x264 ORENJi\Survivor - S18E07? - One of Those 'Coach Moments'.mkv to F:\Series\Survivor\Season 18\Survivor - S18E07? - One of Those 'Coach Moments'.mkv

Processing succeeded for F:\downloads\TV\Survivor S18E07? 720p HDTV x264 ORENJi\survivor.s18e07.720p.hdtv.x264-orenji.mkv

Deleting folder F:\downloads\TV\Survivor S18E07? 720p HDTV x264 ORENJi After that I cant see the file whenever I try to approach it via smb://sharename/series, doesnt matter if thats on my macbook or on xbmc. The file is not visible. If I let sabnzbd do the renaming and moving it is no problem, but I'd prefer to let sickbeard handle all the files. It's like there is something wrong with the rights of the file but its windows so I cant chmod it to 0777.

At first I had this problem with sabnzbd as well, but after changing the permissions in the ini file to 0777 it worked. Since the new 473 update I have the problem with sickbeard. I tried everything (logging on as a different user or admin, changing the rights, resharing) but nothing works. Can somebody point me in the right direction please?

Comment by davidjgr...@gmail.com, Feb 19, 2011

Sounds like I'm having a similar problem but it's only happened once so far. Trying to get the newest episode of Supernatural and everything looks like it goes OK, but when I navigate to the directory that should be housing the files, I don't see the show.

Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?

Loading config from /mnt/cache/.permanent/sickbeard/autoProcessTV/autoProcessTV.cfg Opening URL: http://localhost:8081/home/postprocess/processEpisode?nzbName=%5B+Supernatural+S06E14+720p+HDTV+x264+IMMERSE+%5D+%5BREPOST%5D.nzb&quiet=1&dir=%2Fmnt%2Fuser%2FTV%2F%5B+Supernatural+S06E14+720p+HDTV+x264+IMMERSE+%5D+%5BREPOST%5D Processing folder /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?

Processing /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?/supernatural.s06e14.720p.hdtv.x264-immerse.mkv (Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?.nzb)

Parsed /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?/supernatural.s06e14.720p.hdtv.x264-immerse.mkv into Supernatural - S6E14? - 720p HDTV x264 IMMERSE REPOST? (immerse) False?

Checking scene exceptions for a match on [ Supernatural

Looking up [ Supernatural in the DB

Looking up name [ Supernatural on TVDB

Lookup successful, using tvdb id 78901

Loading show object for tvdb_id 78901

Retrieving episode object for 6x14

Looking up quality for name Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?.nzb, got HD TV

Is ep a priority download: False

File /mnt/user/TV/Supernatural/Season 6/Supernatural - S06E14?? - Mannequin 3 The Reckoning.mkv doesn't exist so there's no worries about replacing it

There were no files associated with /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?/supernatural.s06e14.720p.hdtv.x264-immerse.mkv, not renaming anything

After renaming the new file path is /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?/Supernatural - S06E14?? - Mannequin 3 The Reckoning.mkv

There were no files associated with /mnt/user/TV/Supernatural/Season 6/Supernatural - S06E14?? - Mannequin 3 The Reckoning.mkv, not deleting anything

Destination folder for this episode: /mnt/user/TV/Supernatural/Season 6

There were no files associated with /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?/Supernatural - S06E14?? - Mannequin 3 The Reckoning.mkv, not moving anything

Deleting folder /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?

Processing succeeded for /mnt/user/TV/Supernatural S06E14? 720p HDTV x264 IMMERSE REPOST?/supernatural.s06e14.720p.hdtv.x264-immerse.mkv 

Any thoughts?

Comment by project member lad1...@gmail.com, Mar 4, 2011

ok i cant get it to work either

i configured everthing i should have... i think... lets recap:

  • set the correct user name, path,host,port in autoProcessTV.cfg

  • cop at least autoProcessTV.cfg, autoProcessTV.py, sabToSickBeard.py into a SCRIPTFOLDER
  • set SCRIPTFOLDER als the script folder in sabnzbd. in sabnzbd->config->folders
  • set script to sabToSickBeard.py for tv categorie. in sabnzbd->config->categories
  • be happy ... now this is where thinks fail ...

the sabnzbd log says he is happy wih the postprocessing

2011-03-04 13:35:18,721::INFO::[postproc:134] Saving postproc queue
2011-03-04 13:35:18,721::INFO::[downloader:357] Post-processing finished, resuming download

when you try to call sabToSickBeard.py from the terminal you get a msg like

No folder supplied - is this being called from SABnzbd?

well he is right it was from the terminal if i try

$ python sabToSickBeard.py <download folder>/TV

i get the result printed... wich is the html responds from sick beard this is only a part but i thing it tells us where the problem is

 <h2>401 Unauthorized</h2>

        <p>You are not authorized to access that resource<br />In addition, the custom error page failed:

<br />ValueError: invalid literal for int() with base 10: '401 Unauthorized'

now the autoProcessTV.py prints the url it is trying to open too... wich is very nice ! :) if i enter that url in my browser it works ... sickbeard processes correctly ... i get my notifications and the file is moved and everything

i hav checked the username and password !! multiple times ...

UPDATE: i checked it again ... it was my pw ... it was wrong ... i am sry ... anyway everything works fine and maybe i gave someone some insight into ...

Comment by ata...@gmail.com, Mar 22, 2011

Anyone have any idea what I can be doing wrong?

Lie to Me - 3x02 - The Royal We

Loading config from C:\Program Files (x86)\SickBeard?\autoProcessTV\autoProcessTV.cfg Opening URL: http://localhost:8081/home/postprocess/processEpisode?nzbName=Lie+to+Me+-+3x02+-+The+Royal+We.nzb&quiet=1&dir=C%3A%5CUsers%5CShcnard%5CDownloads%5Ccomplete%5CTV%5CLie+To+Me%5CSeason+3 Processing folder C:\Users\Shcnard\Downloads\complete\TV\Lie To Me\Season 3

Processing C:\Users\Shcnard\Downloads\complete\TV\Lie To Me\Season 3\Lie To Me - 3x02 - The Royal We.mkv (Lie to Me - 3x02 - The Royal We.nzb)

Found result in history: (83602, 3, )

Parsed C:\Users\Shcnard\Downloads\complete\TV\Lie To Me\Season 3\Lie To Me - 3x02 - The Royal We.mkv into Lie To Me - S3E2? - The Royal We [ABD: False]

Checking scene exceptions for a match on Lie To Me

Looking up Lie To Me in the DB

Lookup successful, using tvdb id 83602

Loading show object for tvdb_id 83602

Retrieving episode object for 3x2

The old status had a quality in it, using that: HD TV

SB snatched this episode so I'm marking it as priority

Is ep a priority download: True

There is no existing file so there's no worries about replacing it

This download is marked a priority download so I'm going to replace an existing file if I find one

Processing failed for C:\Users\Shcnard\Downloads\complete\TV\Lie To Me\Season 3\Lie To Me - 3x02 - The Royal We.mkv

Comment by avery_ya...@yahoo.co.uk, Jun 7, 2011

Could the result of the script be somewhat shortened ?

The "Processing succeeded for X:\YYYYYYYYYYYYY\ZZZZZZZZZZ\AAAAAAA\Someshow.S03E23?.Titletitle.moretitle.720p.WEB-DL.DD5.1.H.264-KiNGS\verylongfilename"

Bit in the second column of the sabnzbd history is taking up a whole lot of screen real estate , resulting in history entries being twice as high as before.

Can this be helped by making the output of the script smaller ? Or should the makers of sabnzbd be asked to include an option to not show it ?

Thnx in advance.

Comment by bruno.r....@gmail.com, Jun 18, 2011

Also not quite working for me. Just accessing the URL which the script tried from my web browser worked fine, but SAB itself got a 401 error:

401 Unauthorized

You are not authorized to access that resource
In addition, the custom error page failed: 
ValueError: invalid literal for int() with base 10: '401 Unauthorized'

Traceback (most recent call last):

  File "cherrypy\_cprequest.pyo", line 657, in respond

  File "cherrypy\_cprequest.pyo", line 99, in run

  File "cherrypy\_cprequest.pyo", line 59, in __call__

  File "cherrypy\lib\auth_basic.pyo", line 86, in basic_auth

HTTPError: (401, 'You are not authorized to access that resource')

I'm on a Windows 7 machine, and I did double check that the password in the config file is correct.

Comment by Rommel.H...@gmail.com, Jun 25, 2011

i am receiving the same 401 unauthorized error

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title>401 Unauthorized</title>
<style type="text/css">
  1. owered_by {
margin-top: 20px;
border-top: 2px solid black;
font-style: italic;
}
  1. raceback {
color: red;
}
</style>

</head>

<body>
<h2>401 Unauthorized</h2>
<p>You are not authorized to access that resource<br />In addition, the custom error page failed:

<br />ValueError?: invalid literal for int() with base 10: '401 Unauthorized'

</p>

<pre id="traceback">Traceback (most recent call last):

File "/home/niorome/.sickbeard/cherrypy/_cprequest.py", line 657, in respond

self.hooks.run('before_handler')

File "/home/niorome/.sickbeard/cherrypy/_cprequest.py", line 99, in run

hook()

File "/home/niorome/.sickbeard/cherrypy/_cprequest.py", line 59, in __call__

return self.callback(**self.kwargs)

File "/home/niorome/.sickbeard/cherrypy/lib/auth_basic.py", line 86, in basic_auth

raise cherrypy.HTTPError(401, "You are not authorized to access that resource")

HTTPError: (401, 'You are not authorized to access that resource')

</pre>

<div id="powered_by">

<span>Powered by <a href="http://www.cherrypy.org">CherryPy 3.2.0rc1</a></span>

</div>

</body>

</html>

Comment by kto...@gmail.com, Jul 5, 2011

Rommel, I was getting the exact same issue as you. What I did to solve it was change the password again ( to the same one I was using before in sickbeard ) and then do a restart on sickbeard and that solved the issue :)

Comment by whistler...@gmail.com, Jul 22, 2011

Postprocessing didn't work here, but the problem is fixed by letting sab unpack the downloaded files.. See http://sickbeard.com/forums/viewtopic.php?f=4&t=1415&p=10884

Comment by total...@gmail.com, Aug 8, 2011

sabToSickBeard.py only works for when the password in AutoProcessTV.cfg and config.ini is set to 'password' (config.ini can only be changed after SickBeard? is stopped).

Comment by ivovdheu...@gmail.com, Aug 21, 2011

is it possible to implement a configurable timer for post-processing instead of the default 10 mins ?

Comment by g.na...@gmail.com, Aug 23, 2011

any idea how to incorporate more text into the auto-naming script? like brackets around the episode name? My format is usually Dexter S01E01? (bracket here)Pilot(bracket here)

if I put the brackets for some reason it turns it into ?? in this wiki...

Comment by adam.s...@gmail.com, Dec 1, 2011

Is there any way to add custom text to a file name (such as NEW to denote an unwatched episode)?

Comment by earl.w...@gmail.com, Dec 10, 2011

This is really working well for me, but I have a question...

Currently the post processing gives me two naming options related to separators: space or hyphen. I am using hyphen now so I get something like: Show Name - S01E02? - Episode Name.

I have been using a slightly different convention prior to using Sick Beard, that gives me names like: Show Name.S01E02?.Episode Name.

My question is what can I do to change the separator from " - " to "."?

Thank you.

Comment by tbelajo...@gmail.com, Dec 14, 2011

I just installed Sickbeard+SAB with the folling setup Pointed Scripts folder from SAB to SB C:\Users\User\Downloads\SickBeard?-win32-alpha-build491\SickBeard?-win32-alpha-build491\autoProcessTV\sabToSickBeard.exe Is this correct?

SAB Complete and Incomplete in default folders C:\Users\USER\Documents\..

I want the files to be processed then moved to

Z:\Recorded TV\SHOWNAME\Season 1 etc

I also want media browser info processed

What more do I need to do to make this happen?

Comment by chadjaug...@gmail.com, Jan 20, 2012

New Questions

The copy from my tmp directory to the "TV Show/Season" directory is working great w/ the py script under Linux. The only thing left is to delete the files/directory in the tmp directory.

Any ideas on how to get Sick Beard or SANnzbd to do this automatically?

Also, anyone know how to use the "notifications" to tell Boxee that there is a new show available?

Comment by jrs.ot...@gmail.com, Jan 30, 2012

I use sabnzbd+ almost exclusively with Sickbeard. however, occasionally I encounter a show with missing blocks, or an old ep that is not available on Usenet, so I download via torrent. Using the ""Scan & Process TV Download Dir" allows me to dump this torrented file into my Usenet download directory and have Sickbeard automatically post-process it (i.e., move, rename, add to xbmc library)

If I used sabToSickbeard instead this would not be possible. What are the advantages of using sabToSickbeard instead of "Scan & Process TV Download Dir"?

Comment by math...@tarrade.com, Mar 16, 2012

I have configured the script and get always the same error, with o details associate

Comment by math...@tarrade.com, Mar 16, 2012

Exit(-1) Cannot run script /volume1/DL/SABnzbd/scripts/autoProcessTV.cfg (More)

Comment by pearofdu...@gmail.com, Mar 29, 2012

Don't run the .cfg script, you want the .py one! :)

Comment by willemh...@gmail.com, Mar 30, 2012

How can i automaticly remove the processed episode?

Comment by trance...@gmail.com, Apr 9, 2012

Same issue as everyone else... Latest version of both Sickbeard (Alpha 494) and SABnzbd (0.6.15) running on a windows Vista Ultimate box. I got the communication TO SAB working, but the post config isn't. I put a password in the SickBeard? HTTP section, put that in the script, put the script in the SAB folder, added that path the SAB (included sabToSickbeard.exe and autoProcessTV.cfg in the folder) Do I need to put anything in these fields? web_root= ssl=0

Does there need to be a space between the = and the user name/pass??

I have restarted both SickBeard? and SAB and I keep getting Exit(-1) ERROR: You need an autoProcessTV.cfg file - did you rename and edit the .sample? (and yes, yes I have)

Any help would be greatly appreciated!


Sign in to add a comment
Powered by Google Project Hosting