PDA

View Full Version : New plugin design advice



flemming
2008-06-01, 20:51
Before I spend too much time heading down the wrong path I figured I'd seek some advice. I'm interested in writing a plugin which can interact with the Ampache API (http://ampache.org/bugs/wiki/XmlApi). I've already written a PERL module to handle the Ampache specific bits. Now that I've got that, the way I see it there are multiple ways to make the data available to my Squeezebox. My first assumption was that I was going to need to write a full blown plugin and I started working on that. Then read somewhere about the MP3Tunes, Shoutcast, etc plugins being ported over to use the OPML interface and thought that might be the right way to go. I suspect either option is correct depending upon what I want. Access to the Ampache API is protected by a key and an optional username so to start whatever I do needs to be configurable. Since all the provided plugins that were ported over to use the OPML interface live on SqueezeNetwork I'm not sure how configuration would work for my third-party plugin. I suppose the quickest solution would be to write a script that lived somewhere else and talked to the Ampache server and simply generated an OPML file, but that's pretty brute force. The PERL module I've written provides methods like GetArtists(), GetAlbums(), GetAlbumsByArtist(artistID), etc so it was intended to be an on-demand thing. Okay enough rambling, you've probably got the idea by now. I'm interest in other people's thoughts as to which is the best way to proceed. Documentation on using the OPML interface in a plugin seems a little sparse, so any pointers are certainly appreciated. Thanks Much.

Robert

pichonCalavera
2008-06-01, 20:59
Hi, I think you will receive more help if you post this question in the Developer forum: http://forums.slimdevices.com/forumdisplay.php?f=5 , or in the 3rd party plugins forum: http://forums.slimdevices.com/forumdisplay.php?f=4 . Developers there could guide you in the right direction. :)