I can start by telling you what I know. As you probably already is aware
of, you should put your changes in a file called Custom.map which is
placed in the IR directory below the SlimServer installation dir.
To make it work you also need to goto "Player Settings/Remote" in the
web interface and select Custom.map in the drop list that appears if
you have created a Custom.map file.
The Custom.map file has the same format as the Default.map file in the
same directories, so you can get some ideas there. You only need to
list added or changed entries in the Custom.map file.
To connect shuffle.hold to Random Songs in RandomMix you would need
something like:
Code:
--------------------
shuffle.hold = modefunction_PLUGIN.RandomPlay::Plugin->tracks
--------------------
The different parts of this line has the following meaning:
- modefunction: This tells us that the button should be connected to a
function defined for a specific mode in the plugin. There can be other
values than modefunction here, but modefunction is the one to use if
you want to connect buttons to plugin functionality.
- PLUGIN.RandomPlay::Plugin: This part tells us which mode the button
should be connected to. By default modes are created for each plugin
that implements the setMode function with the name "PLUGIN.<Main plugin
class>". For RandomMix which is in the RandomPlay directory the main
class is Plugin, so the mode will be "PLUGIN.RandomPlay::Plugin"
- tracks: This part tells us which function in the mode that should be
called. The functions available in a plugin is usually defined in a
function called getFunctions. For the RandomMix plugin you will find
this in the Plugins/RandomMix/Plugin.pm file and you can see that it
has four different functions defined: "tracks", "albums",
"contributors", "year".
Besides this there can actually be another parameter after tracks, an
example where this is used is in the Dynamic Playlist plugin where a
button can be connected to a playlist like this:
Code:
--------------------
shuffle.hold =
modefunction_PLUGIN.DynamicPlayList->continue_sqlplaylist_randomtracks
--------------------
In this example "continue" is the function and
"sqlplaylist_randomtracks" is an argument to the function. In the
Dynamic Playlist case an argument can be specified for the "continue"
function which tells it which playlist to play.
The Custom.map can also be divided into different sections where a
section tells you in which menu the button will be available. Some
sample of sections found in the Default.map file is:
[home] - Buttons available in the home menu
[off] - Buttons available when you have turned off the SqueezeBox
[browsedb] - Buttons available when you are in one of the browse menus
Of you don't divide the Custom.map file into sections I think the
button will be available everywhere, but I'm not completely sure of
this.
--
erland
Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan, Custom Skip, Multi Library and RandomPlayList plugins'
(http://wiki.erland.homeip.net/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=38232
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins