SAB plugin API?

Got a program that plays well with SABnzbd? Share it here!
Post Reply
midgetspy
Full Member
Full Member
Posts: 243
Joined: February 27th, 2009, 1:10 pm

SAB plugin API?

Post by midgetspy »

I'm in the process of (re)making a TV downloading application in python. My program is highly dependent on SAB; when it finds a show you need it downloads the NZB and passes it to SAB, and once SAB has downloaded it a post-processing script passes the info back into my program. I looked into options for my front end and decided that an HTML interface through cherry.py would be a great way to go. As I researched this option it occurred to me that I was going to be doing an awful lot of work that has already been done by SAB which seems silly since I will be relying heavily on SAB anyway. So I got to thinking - is there any mechanism for adding plugins to SAB? Having my program as simply another tab on the SAB interface would be really ideal, but hacking the code in there and then maintaining it through every SAB update sounds like a nightmare. If there was same sort of API I could follow to minimize my coupling to the SAB code that would make the maintenance of this (and development) much easier. Does anything like this exist? I know I can (and I currently do) use the external API for the download-related things, I'm mostly talking about integration to the SAB GUI.

Thanks,

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

Re: SAB plugin API?

Post by switch »

It may be a feature of 0.6, however a plugin system would be a rather large feature. It would need significant planning, compatibility considerations and easy-to-use and very well documented api's for plugin settings pages, config saving, scheduling, thread management, database operations.

I have done some initial coding - setting up a plugin that uses CherryPy to create a page listing folder content and allowing you to play/stream downloaded files) over http - however everything is still in early stages.

If you would like to help out, then maybe we can get some discussion going on what a plugin developer needs for them to create various plugins. However the actual implementation of a plugin system is a long way off, so you may want to reconsider planning to use it for your program re-write.
midgetspy
Full Member
Full Member
Posts: 243
Joined: February 27th, 2009, 1:10 pm

Re: SAB plugin API?

Post by midgetspy »

I'd be happy to help lay out the requirements from a plugin developer's perspective but I don't have time to contribute code right now - I'm busy working on my own script :0)

I think you could start with a relatively simple system - just give plugins a way to use the SAB config UI and get them to manage and provide the HTML that should show up on their tab inside SAB. The plugins could use the HTTP API for interactions with SAB and manage their own DB/etc for now, the rest could come later. Allowing them to hook into the SAB GUI is really the most important thing IMO.

Nic
Post Reply