Control SABnzbd from Plex

SABnzbd developer switch over a the SABnzbd forums has wirtten a Python script that can let you control SABnzbd from within XBMC.



I tested this out last night in PLEX and it works great!



See here for the discussion - http://forums.sabnzbd.org/index.php?topic=…msg5716#msg5716



See here for the download (v1.3) - http://forums.sabnzbd.org/index.php?topic=…msg6599#msg6599



You need to unzip the files into ~/library/application support/plex/plugins/video/sabnzbd/



Change the settings in settings.py



Boot up plex, go to “watch my videos” and thee should be a new source called video plugins. Select that then select SABnzbd and bobs your uncle.



You can even add RSS feeds and send new stuff to your download queue straight from within Plex.



Check it out.

Just tried it out for a bit. It works really well. The custom Newzbin feeds are what I’m really enjoying.



Thanks for pointing this out. I’ve been using Plex and SABnzbd+ for a while now on a single machine, and it’s great having them interact with each other.

this is brilliant. :slight_smile:



Pure genius - this thing deserves its own slot in the main navi... Now if only they could get the movie info to work, it would be nothing short of perfect.

New version!

http://img60.imageshack.us/img60/9346/xbmc1yr1.png


http://img60.imageshack.us/img60/2421/xbmc2sy6.png


http://img341.imageshack.us/img341/3789/xbmc3pl0.png



IMDB and poster fetching will only work for newzbin feeds. Many thanks goes to Nuka1195 for his python IMDB scraper adapted from the xbmc scraper regular expressions.


Download: [SABnzbd-XBMC-Plugin-1.4.zip](http://sabnzbd.org/switch/misc/SABnzbd-XBMC-Plugin-1.4.zip)

Good stuff switch!



Will check this out tonight

I am having problems getting the script to display my SAB queue. I have entered all of the settings as stated in the readme, but it does nothing when I click on SABNZB - QUEUE. I have tried entering the URL to SAB in settings.py, but this did not help. How do I enable the debug logging to try to figure out what is happening? I can get to SAB just fine in my broswer so I sure it is something to do with the script.

yummy… this thing keeps getting better and better.



Not sure where the log is kept on plex, try looking in "~/library/application support/plex/". Run the plugin and try loading the queue, then open the log and scroll up looking for any errors. Try looking for "sab_url:" and see if that url works in your browser.

21:02:14 T:2689101728 M:129413120 WARNING: CreateFile, error 2 opening file </tmp/plex/aaf09b86.fi>, flags:4, mode:124.<br />
21:02:18 T:2689101728 M:171991040 WARNING: CreateFile, error 2 opening file </tmp/plex/f9d5377b.fi>, flags:4, mode:124.<br />
21:02:32 T:2689101728 M:147234816 WARNING: CreateFile, error 2 opening file </tmp/plex/6de0e208.fi>, flags:4, mode:124.<br />
21:02:39 T:2689101728 M:159989760   ERROR: CGUIMediaWindow::GetDirectory(plugin://video/SABnzbd/?rss_url="""!?!SABnzbd - Queue!?!""",cookie="""""",old_handle="0") failed<br />
21:02:41 T:2689101728 M:120385536 WARNING: CreateFile, error 2 opening file </tmp/plex/6de0e208.fi>, flags:4, mode:124.<br />
21:02:45 T:2689101728 M:167608320   ERROR: CGUIMediaWindow::GetDirectory(plugin://video/SABnzbd/?rss_url="""!?!SABnzbd - Queue!?!""",cookie="""""",old_handle="0") failed



That is all that I see in the log that pertains to SABnzbd. I attempted to open the queue a couple of times.


Enable debug logging in Settings>System>Hardware, reboot plex and try again. Send me the full log if you can't work it out to switch@sabnzbd.org

I finally got the plugin to work thanks to a file Switch sent me. I love the idea of controlling SABnzbd from Plex. My wife can browse for content to queue for download without having to touch the keyboard. However, the big drawback that I see is when an item is added to the SAB queue from Plex the categories are not set appropriately to match the content. This will prevent Plex from finding the media when a library update is triggered because the files do not download to the correct directory. I have to manually move the files before updating the library. Any ideas on how to get the categories to work with the plugin using Newzbin feeds?



If you don't mind editing the source, find item_list.py in plugins/Video/SABnzbd/nzb/ and do a search and replace for "&cat=-1" changing to "&cat=default"

I'll post a fixed version in a bit, just looking for any other bugs.


But will that use the appropriate category from Newzbin (i.e. Music for Music and TV for TV)? Or will everything be set to the default category?


The same for me with, the previous version worked fine, all the settings are correct.

Got a new bug-fix version which should hopefully deal with everyone’s category and sabnzbd queue concerns. Remember to backup your settings.py if you want to transfer your custom feeds over.


http://img408.imageshack.us/img408/3684/screenshot027al9.png

(Horizonz skin)



Download: [SABnzbd-XBMC-Plugin-1.4.1.zip](http://sabnzbd.org/switch/misc/SABnzbd-XBMC-Plugin-1.4.1.zip)

I couldn’t get any of the feeds to display with the new version. Here is my log…

Plex.txt (11.2 KB)


Try using a fresh settings.py (or just remove the newzbin user+pass, they are only needed if you wish to search within saved searches)


I do use saved searches. It allows me to specify an HDTV and HD Movies category. That was a fresh settings.py, just had the username and pass for newzbin added. Is that my only option? Thanks for your help.

EDIT: The RSS link for newzbin saved searches contains an auth key. I was under the impression that this meant a user name and pass were not required to access the feed. Does the script not use this functionality?


The auth key is good for static rss feeds, but when the search value is changed the auth key changes, so I use a custom login and cookie solution. I guessed that you weren't using saved searches, but since you are this fix will do until I release the next version:
Open \plugins\Video\SABnzbd zb\rss_parser.py in a text editor, add "from cookie_fetcher import CookieFetcher" (no quotes) near the top (can be on the first blank line if you are unsure).