Author: adrian
Date: Tue Sep 5 13:19:20 2006
New Revision: 9431
URL: http://svn.slimdevices.com?rev=9431&view=rev
Log:
Bug: N/A
Description: merge -r 9428:9430 from trunk
Modified:
branches/6.5/server/Plugins/RssNews.pm
branches/6.5/server/Slim/Buttons/Playlist.pm
Modified: branches/6.5/server/Plugins/RssNews.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Plugins/RssNews.pm?rev=9431&r1=9430&r2=9431&view=diff
==============================================================================
--- branches/6.5/server/Plugins/RssNews.pm (original)
+++ branches/6.5/server/Plugins/RssNews.pm Tue Sep 5 13:19:20 2006
@@ -483,8 +483,8 @@
if ( !$client->param( 'PLUGIN.RssNews.current_feed' ) ) {
$client->update( {
- 'line1' => $client->string('PLUGIN_RSSNEWS'),
- 'line2' => $client->string('PLUGIN_RSSNEWS_WAIT'),
+ 'line' => [ $client->string('PLUGIN_RSSNEWS'),
+ $client->string('PLUGIN_RSSNEWS_WAIT') ],
} );
}
@@ -525,8 +525,8 @@
if ( $client->param('PLUGIN.RssNews.screensaver_mode') ) {
$client->update( {
- 'line1' => $client->string('PLUGIN_RSSNEWS'),
- 'line2' => $client->string('PLUGIN_RSSNEWS_ERROR'),
+ 'line' => [ $client->string('PLUGIN_RSSNEWS'),
+ $client->string('PLUGIN_RSSNEWS_ERROR') ],
} );
}
}
Modified: branches/6.5/server/Slim/Buttons/Playlist.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Buttons/Playlist.pm?rev=9431&r1=9430&r2=9431&view=diff
==============================================================================
--- branches/6.5/server/Slim/Buttons/Playlist.pm (original)
+++ branches/6.5/server/Slim/Buttons/Playlist.pm Tue Sep 5 13:19:20 2006
@@ -96,8 +96,12 @@
my $newindex = $client->knobPos();
my $oldindex = browseplaylistindex($client);
-
- if ($oldindex != $newindex) {
+ my $songcount = Slim::Player::Playlist::count($client);
+
+ # XXXX assume list is long enough for wrapround to only occur when:
+ my $wrap = (abs($newindex - $oldindex) > $songcount / 2);
+
+ if ($oldindex != $newindex && $songcount > 1) {
browseplaylistindex($client,$newindex);
}
@@ -105,21 +109,23 @@
$::d_ui && msgf("funct: [$funct] old: $oldindex new: $newindex is after setting: [%s]\n", browseplaylistindex($client));
- my ($songcount) = Slim::Player::Playlist::count($client);
-
- if ($songcount < 2 && $oldindex == 0 && $newindex == -1) {
-
- $client->bumpDown;
-
- } elsif ($songcount < 2 && $oldindex == -1 && $newindex == 0) {
-
- $client->bumpUp;
-
- } elsif ($oldindex > $newindex) {
+ if ($songcount < 2) {
+
+ if ($newindex < 0) {
+
+ $client->bumpDown;
+
+ } elsif ($newindex > 0) {
+
+ $client->bumpUp;
+
+ }
+
+ } elsif ($oldindex > $newindex && !$wrap || $oldindex < $newindex && $wrap) {
$client->pushUp;
- } elsif ($oldindex < $newindex) {
+ } else {
$client->pushDown;
}
@@ -460,12 +466,11 @@
}
# update list length for the knob. ### HACK ATTACK ###
- #
- # Only do when we are in mode playlist
- # See Bug: 3561
+ # - only do when we are in mode playlist - see bug: 3561
+ # - use length of 1 for both 1 item lists and empty playlists
if (Slim::Buttons::Common::mode($client) eq 'playlist') {
- $client->param('listLen', Slim::Player::Playlist::count($client));
+ $client->param('listLen', Slim::Player::Playlist::count($client) || 1);
}
# get (and optionally set) the browseplaylistindex parameter that's kept in param stack