[Slim-Checkins] r10065 - in /trunk/server: Changelog7.html
HTML/EN/html/docs/display.html
Slim/Buttons/Common.pm Slim/Buttons/Playlist.pm Slim/Player/Player.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Wed Sep 27 13:14:59 PDT 2006
Author: adrian
Date: Wed Sep 27 13:14:54 2006
New Revision: 10065
URL: http://svn.slimdevices.com?rev=10065&view=rev
Log:
Bug: 4208
Description: Include screen 2 component of now playing in
$client->currentSongLines so that it is displayed as soon as the track
changes when showing now playing.
Modified:
trunk/server/Changelog7.html
trunk/server/HTML/EN/html/docs/display.html
trunk/server/Slim/Buttons/Common.pm
trunk/server/Slim/Buttons/Playlist.pm
trunk/server/Slim/Player/Player.pm
Modified: trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/trunk/server/Changelog7.html?rev=10065&r1=10064&r2=10065&view=diff
==============================================================================
--- trunk/server/Changelog7.html (original)
+++ trunk/server/Changelog7.html Wed Sep 27 13:14:54 2006
@@ -65,6 +65,7 @@
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4145">#4145</a> - Display station name instead of album name in overlay text visualizers on transporter second screen</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4159">#4159</a> - second screen needs to be blank when prompting for software update on transporter</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4190">#4190</a> - xmlbrower transition problem</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4208">#4208</a> - Screen 2 of Now Playing is not updated immediately when track is changed by fwd/rev etc</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4213">#4213</a> - Slimserver can crash due to display being deleted from client object at forget time</li>
<ul>
<li></li>
Modified: trunk/server/HTML/EN/html/docs/display.html
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/html/docs/display.html?rev=10065&r1=10064&r2=10065&view=diff
==============================================================================
--- trunk/server/HTML/EN/html/docs/display.html (original)
+++ trunk/server/HTML/EN/html/docs/display.html Wed Sep 27 13:14:54 2006
@@ -760,11 +760,9 @@
'center' etc components without specifying 'screen2'. This is because
the calling code will force them into a screen2 component.</p>
-<p>Caveat: A limitation of this mode at present is that if the
-text on the right hand screen scrolls, this prevents animated menu
-transitions on the left hand screen. The left hand screen will still
-show the correct menu items, but will not perform the normal scrolling
-between menu items.</p>
+<p>Note also that the lines function registered for lines2periodic
+will be called with a second parameter of '1'. This is a flag used
+internally to the server and should be ignored.</p>
<hr></hr>
<h4>Custom Server Mode Displays</h4>
Modified: trunk/server/Slim/Buttons/Common.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/Common.pm?rev=10065&r1=10064&r2=10065&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/Common.pm (original)
+++ trunk/server/Slim/Buttons/Common.pm Wed Sep 27 13:14:54 2006
@@ -1963,7 +1963,7 @@
}
if ($update2 && !$client->display->animateState() && (my $linefunc = $client->lines2periodic()) ) {
- $client->display->update({ 'screen2' => &$linefunc($client) });
+ $client->display->update({ 'screen2' => &$linefunc($client, 1) });
}
}
Modified: trunk/server/Slim/Buttons/Playlist.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/Playlist.pm?rev=10065&r1=10064&r2=10065&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/Playlist.pm (original)
+++ trunk/server/Slim/Buttons/Playlist.pm Wed Sep 27 13:14:54 2006
@@ -394,7 +394,7 @@
sub lines {
my $client = shift;
- my ($parts, $line1, $line2);
+ my $parts;
my $nowPlaying = showingNowPlaying($client);
@@ -408,49 +408,38 @@
browseplaylistindex($client,Slim::Player::Playlist::count($client)-1)
}
- $line1 = sprintf("%s (%d %s %d) ",
+ my $line1 = sprintf("%s (%d %s %d) ",
$client->string('PLAYLIST'),
browseplaylistindex($client) + 1,
$client->string('OUT_OF'),
Slim::Player::Playlist::count($client)
);
- $line2 = Slim::Music::Info::standardTitle(
- $client,
- Slim::Player::Playlist::song($client, browseplaylistindex($client))
- );
-
+ my $song = Slim::Player::Playlist::song($client, browseplaylistindex($client) );
+
$parts = {
- 'line' => [ $line1, $line2 ],
+ 'line' => [ $line1, Slim::Music::Info::standardTitle($client, $song) ],
'overlay' => [ undef, $client->symbols('notesymbol') ],
};
- }
-
- if ($client->display->showExtendedText()) {
-
- my ($s2line1, $s2line2);
-
- my $song = Slim::Player::Playlist::song($client, $nowPlaying ? undef : browseplaylistindex($client) );
-
- if ($song && $song->isRemoteURL) {
-
- my $currentTitle = Slim::Music::Info::getCurrentTitle($client, $song->url);
- my $title = Slim::Music::Info::displayText($client, $song, 'TITLE');
-
- if ( ($currentTitle || '') ne ($title || '') && !Slim::Music::Info::isURL($title) ) {
- $s2line2 = $title;
- }
-
- } else {
-
- $s2line1 = Slim::Music::Info::displayText($client, $song, 'ALBUM');
- $s2line2 = Slim::Music::Info::displayText($client, $song, 'ARTIST');
-
- }
-
- $parts->{'screen2'} ||= {
- 'line' => [ $s2line1, $s2line2 ],
- };
+
+ if ($client->display->showExtendedText()) {
+
+ if ($song && !($song->isRemoteURL)) {
+
+ $parts->{'screen2'} = {
+ 'line' => [
+ Slim::Music::Info::displayText($client, $song, 'ALBUM'),
+ Slim::Music::Info::displayText($client, $song, 'ARTIST'),
+ ]
+ };
+
+ } else {
+
+ $parts->{'screen2'} = {};
+
+ }
+
+ }
}
Modified: trunk/server/Slim/Player/Player.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Player.pm?rev=10065&r1=10064&r2=10065&view=diff
==============================================================================
--- trunk/server/Slim/Player/Player.pm (original)
+++ trunk/server/Slim/Player/Player.pm Wed Sep 27 13:14:54 2006
@@ -565,6 +565,8 @@
sub currentSongLines {
my $client = shift;
+ my $suppressScreen2 = shift;
+
my $parts;
my $playlistlen = Slim::Player::Playlist::count($client);
@@ -628,12 +630,41 @@
}
}
- $parts->{line}[1] = Slim::Music::Info::getCurrentTitle($client, Slim::Player::Playlist::url($client));
+ my $currentTitle = Slim::Music::Info::getCurrentTitle($client, Slim::Player::Playlist::url($client));
+
+ $parts->{line}[1] = $currentTitle;
$parts->{overlay}[1] = $client->symbols('notesymbol');
# add in the progress bar and time...
$client->nowPlayingModeLines($parts);
+
+ # add screen2 information if required
+ if ($client->display->showExtendedText() && !$suppressScreen2) {
+
+ my ($s2line1, $s2line2);
+
+ my $song = Slim::Player::Playlist::song($client);
+
+ if ($song && $song->isRemoteURL) {
+
+ my $title = Slim::Music::Info::displayText($client, $song, 'TITLE');
+
+ if ( ($currentTitle || '') ne ($title || '') && !Slim::Music::Info::isURL($title) ) {
+ $s2line2 = $title;
+ }
+
+ } else {
+
+ $s2line1 = Slim::Music::Info::displayText($client, $song, 'ALBUM');
+ $s2line2 = Slim::Music::Info::displayText($client, $song, 'ARTIST');
+
+ }
+
+ $parts->{'screen2'} = {
+ 'line' => [ $s2line1, $s2line2 ],
+ };
+ }
}
return $parts;
More information about the checkins
mailing list