<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

PluginLines

From SqueezeboxWiki

Revision as of 07:07, 23 June 2010 by Soulkeeper (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The lines subroutine returns the text that the Slim Client will display while using your plugin. The setMode() function creates the reference for the lines subroutine, and your lines subroutine name must match that. Each mode may have its own set of lines, and each is named after the reference created in each setMode. The input for this function is the current client information, and the return is two strings for main display and optionally a pair of strings which may need to be overlayed on top of the first pair, right justified. The lines are sent to the display at any time using the command:

$client->update();

The simple line subroutine, below, is taken from Rescan.pm.

Example 3:

sub lines { 
    my $client = shift; 
    my $line1 = $client->string('PLUGIN_RESCAN_MUSIC_LIBRARY'); 
    my $line2 = $client->string('PLUGIN_RESCAN_PRESS_PLAY'); 
    return ($line1, $line2); 
}

Next Page