XBMC SABnzbd+ Python Script

Got a program that plays well with SABnzbd? Share it here!
Post Reply
evidenceunseen
Jr. Member
Jr. Member
Posts: 56
Joined: February 11th, 2008, 2:33 pm

XBMC SABnzbd+ Python Script

Post by evidenceunseen »

I was wondering if anyone would be willing to make a python script for XBMC(http://www.xbmc.org) to control and interact with SABnzbd and newbin, and possibly other nzb sites.

Possible resources for anyone willing to take this on:

SABnzbd Controller - a separate xbmc controller for sabnzbd, no longer functioning
http://xbmc.org/forum/showthread.php?t= ... ht=sabnzbd

Torrent Controller - also included a module for sabnzbd and newzbin and several other sites, also no longer functioning
http://xbmc.org/forum/showthread.php?t= ... ht=sabnzbd

HellaXBMC - a script for hellanzb(another nzb downloader)
http://xbmc.org/forum/showthread.php?t= ... ht=sabnzbd

I have also posted this on their forums to see if anyone is interested.
http://xbmc.org/forum/showthread.php?t=32482

If you have any questions or there is any way I can help let me know.
Last edited by switch on April 9th, 2008, 5:17 am, edited 1 time in total.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: XBMC SABnzbd+ Python Script

Post by switch »

This is something I would really want, I spoke to the author of Torrent Controller (the same guy who did SABnzbd Controller I believe) a while back, but he seemed too busy to keep his script running.

If anyone takes takes this up and need help with the api, find me on irc or shoot an email to [email protected]

EDIT: Fixed your links.
chunk1970
Newbie
Newbie
Posts: 2
Joined: April 12th, 2008, 5:27 am

Re: XBMC SABnzbd+ Python Script

Post by chunk1970 »

Hi All,

Im the originator of the Torrent-Controlller XBMC script. I never really got around to finish the SAB implementation fully as Ive been busy working...

Still working but Ive been using the SAB+ program for the last few weeks and its nice to see it being developed again..

I would love to get it completed and start developing it again and I do hope that I'll be in a position to do so in a few weeks, Ive only had my xbox/xbmc running for the first time in about 6 months since getting a hdtv and hd cables.

I did hear of someone possibly writing an API as part of SAB+ to control SAB by other means over a network which would make the whole process such a delight.

Cheers.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: XBMC SABnzbd+ Python Script

Post by shypike »

The API is available and quite complete:

http://sabnzbd.wikidot.com/automation-support
FLACme
Newbie
Newbie
Posts: 8
Joined: February 7th, 2008, 9:48 pm

Re: XBMC SABnzbd+ Python Script

Post by FLACme »

switch wrote: This is something I would really want,
+1

:)
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: XBMC SABnzbd+ Python Script

Post by switch »

I got bored this evening and started on an xbmc plugin, but I have run into a few problems, and not sure if I will continue development.

My preference for implementing this was to browse sites using their RSS feeds instead of scraping the data from sites which is against some sites AUP (newzbin's) and also prone to break all the time for minor page changes, basically a real pain in the ass. RSS feeds are the closest most sites will get to an api that can be accessed by third parties.

What I have done so far:
- I added simple browsing of fixed RSS feeds that contain nzb files. These can list the latest stuff from free sites (eg: nzbtv, binsearch) and newzbin.
- Selecting the download will bring up an option to download or stream the file (streaming isn't in place yet, and might not be for some time, if at all). Downloading will just add it to your sabnzbd queue.
- And added the simple viewing of files in sabnzbd's queue with the %age done.

Problems:
- The authentication string Newzbin use differs for each page making searching impossible, as changing the query changes the auth string.
- The fixed RSS feeds will only have the latest 20-50 items, with no way of browsing for more.
- There are only a few other sites that have RSS feeds, and they need for users to log in to view/download. Adding these is a major pain in the arse as it needs fiddling about with cookies for each site.

So basically with no searching, limited sites, and a limited amount of content is this worth it?
zodo
Newbie
Newbie
Posts: 1
Joined: August 17th, 2008, 8:53 pm

Re: XBMC SABnzbd+ Python Script

Post by zodo »

Switch: Your description of the XBMC plugin you developed sounds perfect. I have long wished for the ability to grab shows from the tvnzb RSS feed without getting off the couch. I had almost taken the plunge to learn python (if XBMC supported Ruby I would have started work on it already!).

It would definitely be useful, and I would be quite happy if you shared it with us.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: XBMC SABnzbd+ Python Script

Post by switch »

Code: Select all

SABnzbd Plugin
v1.0
================
1) Extract to XBMC\plugins\Video
2) Make sure sabnzbd is listening on your local ip address unless sabnzbd and xbmc are running on the same machine
3) Open up settings.py, Enter in your sabnzbd ip address in "sab_host"
4) Replace 'enter your rss feed here' with your newzbin RSS feeds
5) Add any extra RSS feeds to the dictionary (note these will be replaced when upgrading versions, so make a copy)
SABnzbd-XBMC-Plugin-1.0.zip

Still in it's early stages, there is no controlling of sabnzbd for instance, I'm still deciding whether I will continue developing it.
evidenceunseen
Jr. Member
Jr. Member
Posts: 56
Joined: February 11th, 2008, 2:33 pm

Re: XBMC SABnzbd+ Python Script

Post by evidenceunseen »

Much appreciated Switch. I do hope you continue to develop it. If you need any help let me know.
Flamez
Newbie
Newbie
Posts: 8
Joined: May 25th, 2008, 9:00 am

Re: XBMC SABnzbd+ Python Script

Post by Flamez »

Thank you so much for making this plug-in!  i have waited for such a thing for a long time!  I did play around with adding my own rss feeds some tonight and could get some to show but others would only let me see the files offered and would not let me download the them although it did say it added them to the queue.  I am not a programmer of any sorts, but i am willing to help you test.  Keep up the good work!
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: XBMC SABnzbd+ Python Script

Post by switch »

PM me an example feed and I will take a look. Chances are the link in the RSS feed doesn't point to the actual nzb file. It might be possible to modify the link for it to download files, as long as the nzb site doesn't require a user/password.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: XBMC SABnzbd+ Python Script

Post by switch »

Made a couple of improvements, more specifically can now search newzbin, opening up a lot more content. May also have a way to browse all TV and Movies in an organised manner. You will need to enter in your newzbin settings in settings.py for newzbin items to show.

Code: Select all

Changelog
================
1.1
-Added searching of nzb files from newzbin
-Added support for running a password protected sabnzbd
-Changed newzbin to use username and password for authentication
-Added more error messages to help debug
-Added file sizes for newzbin feeds
-Added icons for nzb downloads
SABnzbd-XBMC-Plugin-1.1.zip
Flamez
Newbie
Newbie
Posts: 8
Joined: May 25th, 2008, 9:00 am

Re: XBMC SABnzbd+ Python Script

Post by Flamez »

Thank you!!!!!!
hjaltij
Newbie
Newbie
Posts: 12
Joined: August 22nd, 2008, 10:32 am

Re: XBMC SABnzbd+ Python Script

Post by hjaltij »

Hi.

First of all thanks a lot for your work. I tried it on my Plex setup (XBMC for OSX) and it didn't add anything to the queue. So I enabled the debug log and found out that the slashes were quoted in the string so the regex failed to match the report id. I changed this line in sabnzbd_add.py

[44] url = self.url

to

[44] url = urllib.unquote(self.url)

I didn't look into why it was necessary on my platform.

Thanks again.
- H
Last edited by hjaltij on August 22nd, 2008, 10:40 am, edited 1 time in total.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: XBMC SABnzbd+ Python Script

Post by switch »

Thanks, looks like I didn't test that change enough, I'll issue a new release in a bit.

Code: Select all

Changelog
================
1.2
-Fixed newzbin cookies, dummy user/pass was being sent
-Fixed adding newzbin files
SABnzbd-XBMC-Plugin-1.2.zip
Last edited by switch on August 22nd, 2008, 11:09 am, edited 1 time in total.
Post Reply