PDA

View Full Version : Client specific plugin info on now player screen ?



erland
2007-05-19, 09:00
Is it possible in some way to put client specific plugin information on the Now Playing screen. I'm using Michaels MusicInfoSCR screensaver which allows me to put custom title formats on the Now Playing screen. The problem is that when my title format callback is called I only get the track object as in-parameter and no $client object. This means that I don't know which client value I should return. I register the title format callback by calling Slim::Music::TitleFormatter::addFormat

This is what I'm trying to do:
The Multi Library plugin makes it possible for the user to select an active virtual library per player. And I would like to show the title of the active library on the Now Playing screen for each player.

Is there some other way to do this ?

Triode
2007-05-19, 10:06
I don't think you will be able to do this via custom formats with Michael's plugin, however you would be able to register your own lines function for now playing which will be able to create client specific text.

The lines function is registered with client->customPlaylistLines(). See the display api docs under technical info for more infomation or Michael's plugin...

erland
2007-05-19, 10:34
I don't think you will be able to do this via custom formats with Michael's plugin, however you would be able to register your own lines function for now playing which will be able to create client specific text.

The lines function is registered with client->customPlaylistLines(). See the display api docs under technical info for more infomation or Michael's plugin...
If I understand this correctly it would mean that I couldn't use the MusicInfoSCR to show other information on the Now Playing screen at the same time as my plugin shows the active library ?

Is there any chance to provide a $client in the title format callback, or would this mean that the title format handling must be changed totally within SlimServer ?

Triode
2007-05-19, 10:47
If I understand this correctly it would mean that I couldn't use the MusicInfoSCR to show other information on the Now Playing screen at the same time as my plugin shows the active library ?


You could register your pluing for the callback, call Michael's plugin and to get the base screen and then add in your details before you return the screen hash to the server...



Is there any chance to provide a $client in the title format callback, or would this mean that the title format handling must be changed totally within SlimServer ?

Well it needs client to be carried through several calls where it currently isn't carried. So possible but not till 7.0. Maybe best to see what Michael says on this, is there an easier way of getting the info to his plugin?