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"
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:
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.
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?
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.
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?
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.
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
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)"
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
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.
@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
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?
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.
Any thoughts?
ok i cant get it to work either
i configured everthing i should have... i think... lets recap:
the sabnzbd log says he is happy wih the postprocessing
when you try to call sabToSickBeard.py from the terminal you get a msg like
well he is right it was from the terminal if i try
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 ...
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
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.
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:
I'm on a Windows 7 machine, and I did double check that the password in the config file is correct.
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>
</head>
<br />ValueError?: invalid literal for int() with base 10: '401 Unauthorized'
</p>
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>
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 :)
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
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).
is it possible to implement a configurable timer for post-processing instead of the default 10 mins ?
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...
Is there any way to add custom text to a file name (such as NEW to denote an unwatched episode)?
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.
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?
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?
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"?
I have configured the script and get always the same error, with o details associate
Exit(-1) Cannot run script /volume1/DL/SABnzbd/scripts/autoProcessTV.cfg (More)
Don't run the .cfg script, you want the .py one! :)
How can i automaticly remove the processed episode?
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!