View Full Version : plugin browse menu help request

2009-03-08, 10:33
I am rewriting a squeezecenter v7.X plugin that I originally wrote for slimserver 6.x that talks to my homecontrol system (HomeVisionXL). However, as I have only a basic perl knowledge, I am getting confused with the way the new browse menus work and could do with a few pointers.

Essentially I need a hierarchy of menus (modes) that can be navigated up and down. At the bottom of each tree I need to match a selection and then invoke my subroutine to talk to the controller. I have looked at other plugins but none seem to use a consistent set of squeezecenter commands or do quite what I am trying to do.

Could someone point me at or share with me a good example?

Many thanks in advance.

2009-03-11, 11:32
Hi, good luck with that! ;)

I was wishing to write a plugin as well, but the available documentation seems to be well out of date for 6.x. From what I can tell from looking at other plugins you now need to do two seperate menu systems, one for the duet/boom? and another that works on the squeezebox.

Maybe one day there will be a simple API with just one menu system but probably not any time soon! Certainly at the moment it seems overly complicated and makes each plugin larger than it needs to be.

2009-03-11, 12:15
From what I can tell from looking at other plugins you now need to do two seperate menu systems, one for the duet/boom? and another that works on the squeezebox.

Actually it's three variants:
- One for the IR based devices (Classic, Boom, Transporter)
- One for the Controller based devices (Duet)
- One for the web interface

A plugin can choose to implement only one, two or three of these interfaces. The IR based interface and the web interface is fairly similar to 6.5 plugins but the Controller interface is completely new.

My guess is that the Controller based interface is the one that will be used for future devices. I've also heard that opml is the future, but so far the support for local opml menus is missing some stuff, it's great for online resources though.

A good start is to look at an existing plugin that is bundled with SqueezeCenter that have a similar menu to what you want.

2009-03-31, 07:49

Do you have an example of a Slim::Plugin::Base type plugin that will appear on the controller menu under Squeezecenter 7.3.2

I'm trying to get the XMRadio plugin working on 7.3.2 and I can't figure out how to make it appear on the controller menu. I lifted code from the Random Mix plugin, renamed all its parts, but nothing appears on the controller and it never appears to get called by Squeezecenter. Are .Base type plugins are no-longer supported?

.Opml type plugins, in contrast, are straight forward.


2009-03-31, 22:02
Slim::Plugin::Base type plugins are definitely supported, the Random Mix plugin contains some different menus so it should be a good starting point if you like to see how to do things.

If you don't get it to appear on the Controller at all it probably doesn't call Slim::Control::Jive::registerPluginMenu during the initialization. You typically want to call this function somewhere inside the initPlugin or postinitPlugin subroutines.

Feel free to to post some code if you don't get it to work and someone can take a look at it to see which parts are missing.

2009-04-05, 16:57
I've been working to get the XMPlugin to work against squeezecenter 7.3.2. I have the duet controller menu working, but there's one remaining problem with the Web interface - if anyone can help.

I haven't changed the web interface from the original code. It works in that it displays stations & genres etc, but a click to the play icon (from any of the XM Plugin's pages) doesn't deliver an http request, and so you can't make it play. Cutting the URL from the page source from the javascript into the browser address bar works and the station plays.

In the HTML page source, the js performs an onclick="Utils.processCommandURL('tune.html?action=play&etc etc. I'm guessing that processCommandURL has been replaced with something else in squeezecenter 7.3.2?

Also - is the plugin HTML generated from a wizard, if so, where can I find it?
Neil Potter

2009-04-23, 17:10
And one more thing - I cannot get the XMRadio entry to appear in the Internet Radio on the controller. It appears in the home menu instead. Yet on the browser, it appears under internet radio. I set the node to 'radios'.