I'm glad you liked it, I think you have understand how it works. Just as
clarification the basic function is:

1.
It calls getMusicInfoSCRCustomItems() during the initialization on all
plugins where this method is defined. The plugin returns a list of all
custom items it supports. The items will be displayed and possible to
choose in the web interface as all other already existing items.

2.
The getMusicInfoSCRCustomItem() will be called on the plugin each time
MusicInfoSCR wants to display text text and finds a custom item. The
plugin is responsible to parse and replace the tags when this method is
called. At the moment the call to this method is placed so it is only
called at track change. Besides this I also updated
setScreensaverMusicInfoMode so it clears the displayCache for all
custom items each time the screensaver is activated. In my rating
plugin this means that the rating will be displayed when the track
change, but it will also be shown when I change the rating since this
operation deactivates the screensaver temporary and then when the
screensaver is activated again the new rating is shown.

It would probably be possible to retreive custom items every second
also, but I decided that it was enough to retreive them at screensaver
activate and at track change. I was not sure if it would result
performance problems if I retreived them too often, but I have not
tested this.

I'm quite new att writing perl code, so if you want to include my
additions to your code you might want to check so I have not made any
critical misstakes first.


-- 
erland

Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=20016

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to