[Slim-Checkins] r12536 - in /trunk/server/Slim: Control/Commands.pm Player/Player.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Sun Aug 12 13:03:32 PDT 2007
Author: adrian
Date: Sun Aug 12 13:03:31 2007
New Revision: 12536
URL: http://svn.slimdevices.com?rev=12536&view=rev
Log:
Bug: N/A
Description: modify song text sent to jive - contains non localised
strings for the moment
Modified:
trunk/server/Slim/Control/Commands.pm
trunk/server/Slim/Player/Player.pm
Modified: trunk/server/Slim/Control/Commands.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Control/Commands.pm?rev=12536&r1=12535&r2=12536&view=diff
==============================================================================
--- trunk/server/Slim/Control/Commands.pm (original)
+++ trunk/server/Slim/Control/Commands.pm Sun Aug 12 13:03:31 2007
@@ -1066,7 +1066,7 @@
$client->showBriefly({
'line' => [$line1, $line2],
- 'jiv' => { 'icon' => 'play', text => [ $line2 ], 'icon-id' => 0 },
+ 'jiv' => { 'type' => 'song', text => [ $line2 ], 'icon-id' => 0 },
}, { 'duration' => $timeout + 5 });
}
}
@@ -1460,10 +1460,9 @@
if ($load || $add) {
$client->showBriefly({
'jiv' => {
- 'icon' => $load ? 'play' : 'add',
- 'icon-id' => $tracks[0]->album->artwork || 0,
- 'text' => [ Slim::Music::Info::displayText($client, $tracks[0], 'TITLE'),
- Slim::Music::Info::displayText($client, $tracks[0], 'ARTIST') ]
+ 'type' => 'song',
+ 'text' => $add ? [ 'Adding', $tracks[0]->title, 'to Playlist...' ] : [ 'Playing', $tracks[0]->title ],
+ 'icon-id' => $tracks[0]->album->artwork,
}
});
}
Modified: trunk/server/Slim/Player/Player.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Player.pm?rev=12536&r1=12535&r2=12536&view=diff
==============================================================================
--- trunk/server/Slim/Player/Player.pm (original)
+++ trunk/server/Slim/Player/Player.pm Sun Aug 12 13:03:31 2007
@@ -377,10 +377,14 @@
my $suppressScreen2 = shift;
my $parts;
-
+ my $status;
+
+ my $playmode = Slim::Player::Source::playmode($client);
my $playlistlen = Slim::Player::Playlist::count($client);
if ($playlistlen < 1) {
+
+ $status = $client->string('NOTHING');
$parts = { 'line' => [ $client->string('NOW_PLAYING'), $client->string('NOTHING') ] };
@@ -390,16 +394,18 @@
} else {
- if (Slim::Player::Source::playmode($client) eq "pause") {
+ if ($playmode eq "pause") {
+
+ $status = $client->string('PAUSED');
if ( $playlistlen == 1 ) {
- $parts->{line}[0] = $client->string('PAUSED');
+ $parts->{line}[0] = $status;
} else {
$parts->{line}[0] = sprintf(
- $client->string('PAUSED')." (%d %s %d) ",
+ $status." (%d %s %d) ",
Slim::Player::Source::playingSongIndex($client) + 1, $client->string('OUT_OF'), $playlistlen
);
}
@@ -408,25 +414,34 @@
# this will cause the display to show the "Now playing" screen to show when paused.
# line1 = "Now playing" . sprintf " (%d %s %d) ", Slim::Player::Source::playingSongIndex($client) + 1, string('OUT_OF'), $playlistlen;
- } elsif (Slim::Player::Source::playmode($client) eq "stop") {
+ } elsif ($playmode eq "stop") {
+
+ $status = $client->string('STOPPED');
if ( $playlistlen == 1 ) {
- $parts->{line}[0] = $client->string('STOPPED');
+ $parts->{line}[0] = $status;
}
else {
$parts->{line}[0] = sprintf(
- $client->string('STOPPED')." (%d %s %d) ",
+ $status." (%d %s %d) ",
Slim::Player::Source::playingSongIndex($client) + 1, $client->string('OUT_OF'), $playlistlen
);
}
} else {
+ $status = $client->string('PLAYING');
+
if (Slim::Player::Source::rate($client) != 1) {
- $parts->{line}[0] = $client->string('NOW_SCANNING') . ' ' . Slim::Player::Source::rate($client) . 'x';
+
+ $status = $parts->{line}[0] = client->string('NOW_SCANNING') . ' ' . Slim::Player::Source::rate($client) . 'x';
+
} elsif (Slim::Player::Playlist::shuffle($client)) {
+
$parts->{line}[0] = $client->string('PLAYING_RANDOMLY');
+
} else {
+
$parts->{line}[0] = $client->string('PLAYING');
}
@@ -478,9 +493,9 @@
}
$parts->{'jiv'} = {
- 'icon' => Slim::Player::Source::playmode($client),
- 'icon-id' => $song->album ? $song->album->artwork : 0,
- 'text' => [ $currentTitle, Slim::Music::Info::displayText($client, $song, 'ARTIST') ],
+ 'type' => 'song',
+ 'text' => [ $status, $song->title ],
+ 'icon-id' => $song->remote ? 0 : $song->album->artwork || 0,
};
}
More information about the checkins
mailing list