cparker;378731 Wrote: 
> Hi Erland,
> 
> This is a great plugin and opens up a possibility that I would like to
> explore, rather than have my plugin using ShowBriefly which is a bit in
> the face!  I wondered if I could have my plugin just update a custom
> title, that is then shown by TitleSwitcher as part of its rotation.
> 
> I created my own custom interface title and can set it in my initplugin
> section and have it appear, but I cant seem to then update this custom
> title.
> 
> Do you have any ideas how to achieve this?
> 
> Cheers
It depends when you like to update it.

showBriefly is the correct way to show messages to users when something
happens, the reason is that showBriefly will also show up on the
Controller while TitleSwitcher/MusicInfoSCR currently only works on
Squeezebox Classic. Title formats are useful if you like to give the
user an option to show the state of something in your plugin directly
on the Now Playing screen.

Standard title formats are only updated due to specific events, for
example track changes and screen saver activate/deactive (if I remember
correctly). If you like something to update more often than that, I
think you will need to integrate with MusicInfoSCR directly. This is
done by implementing a getMusicInfoSCRCustomItems function in your
plugin which will be called by MusicInfoSCR. 

This would look something like this:

Code:
--------------------
    
  sub getMusicInfoSCRCustomItems {
        my $musicInfoSCRFormats = {};
        $musicInfoSCRFormats->{'SUGARCUBEINFO'} = {
                        'cb' => \&getSugarCubeInfo,
                        'cache' => 1,
        };
  
        return $musicInfoSCRFormats;
  }
  
  sub getSugarCubeInfo
  {
        my $client = shift;
        my $song = shift;
        my $tag = shift;
  
        if($tag eq 'SUGARCUBEINFO') {
  return "Time is ".time();
        }
        return undef;        
  }
  
--------------------


-- 
erland

Erland Isaksson
'My homepage' (http://erland.isaksson.info) 'My download page'
(http://erland.isaksson.info/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan,  Custom Skip, Multi Library, Title Switcher and Database
Query plugins'
(http://wiki.erland.isaksson.info/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=55240

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

Reply via email to