Page 1 of 1

Startup Sabnzbd box using WOL after detecting Newzbin Bookmarks

Posted: December 23rd, 2009, 9:59 am
by timecmdr
Hi Guys,

I’m Looking for a bit of help. It’s tenuously  Sabnzbd related but I think it will assist a few people.

I have a laptop based ubuntu server (low Power Usage) running at home as a gateway to my home network. I also have a Linux based XBMC media server sat under my TV with sabnzbd running at startup.

When I'm after a new movie I bookmark it on Newzbin then SSH to my laptop and send a Wake on lan packet to my media server. The media server starts up and then sabnzbd then checks for bookmarks, downloads, unrars and then shutsdown the media server. Sweet!

However! I wish to cut out the SSH step by getting my laptop server to check for the bookmarks and on finding send the WOL packet. I know this must be possible as sabnzbd can check.

I've messed with WGET but not managed to get to the bookmarks page, I was wondering if someone could explain how Sabnzbd interfaces with Newzbin or provide a way of checking for a bookmark.

Thanks in advance

TC

Re: Startup Sabnzbd box using WOL after detecting Newzbin Bookmarks

Posted: December 23rd, 2009, 1:14 pm
by shypike
Look in the source code of SABnzbd.
Module newzbin.py.
BTW: newzbin has documented their interface quite well:
See: http://docs.newzbin.com/index.php/Newzbin_API:Bookmarks and
http://docs.newzbin.com/index.php/Newzbin_API:DirectNZB

Re: Startup Sabnzbd box using WOL after detecting Newzbin Bookmarks

Posted: December 24th, 2009, 5:41 am
by timecmdr
Brilliant I didn't realize they had a documentation area.

For those interested the code to retrieve a list of bookmarks is

Code: Select all

wget --post-data "username=******&password=******&action=fetch" http://www.newzbin.com/api/bookmarks/