$ svn -r28402:29885 diff server/Slim/Networking/Slimproto.pm Index: server/Slim/Networking/Slimproto.pm =================================================================== --- server/Slim/Networking/Slimproto.pm (revision 28402) +++ server/Slim/Networking/Slimproto.pm (revision 29885) @@ -409,7 +409,9 @@ $handler_ref->( $client, \$data ); } else { - $log->error( "Client not found for slimproto msg op: $op", ' from ', inet_ntoa($s->peeraddr) ); + if ( $s->peeraddr ) { + $log->error( "Client not found for slimproto msg op: $op", ' from ', inet_ntoa($s->peeraddr) ); + } slimproto_close($s); } } @@ -514,7 +516,7 @@ my ($irTime, $irCode) = unpack('NxxH8', $$data_ref); - Slim::Hardware::IR::handler($client, $irCode, $irTime) if $client->irenable(); + Slim::Hardware::IR::enqueue($client, $irCode, $irTime) if $client->irenable(); if ( main::DEBUGLOG && $faclog->is_debug ) { $faclog->debug(sprintf("FACTORYTEST\tevent=ir\tmac=%s\tcode=%s", $client->id, $irCode)); @@ -1343,7 +1345,7 @@ # handle hard buttons my ($time, $button) = unpack( 'NH8', $$data_ref); - Slim::Hardware::IR::handler($client, $button, $time); + Slim::Hardware::IR::enqueue($client, $button, $time); main::INFOLOG && $log->info("Hard button: $button time: $time"); } $ svn -r28402:29885 diff server/Slim/Player/Squeezebox2.pm Index: server/Slim/Player/Squeezebox2.pm =================================================================== --- server/Slim/Player/Squeezebox2.pm (revision 28402) +++ server/Slim/Player/Squeezebox2.pm (revision 29885) @@ -884,7 +884,11 @@ }, }; -$prefs->setChange( sub { my ($pref, $val, $client) = @_; $client->setPlayerSetting($pref, $val); }, keys %{$pref_settings}); +$prefs->setChange( sub { + my ($pref, $val, $client) = @_; + $val = Slim::Utils::Unicode::utf8encode($val) if $pref eq 'playername'; + $client->setPlayerSetting($pref, $val); +}, keys %{$pref_settings}); # Request a pref from the player firmware sub getPlayerSetting { $ svn -r28402:29885 diff server/Slim/Player/Player.pm Index: server/Slim/Player/Player.pm =================================================================== --- server/Slim/Player/Player.pm (revision 28402) +++ server/Slim/Player/Player.pm (revision 29885) @@ -581,6 +581,10 @@ if ( !$artwork ) { $imgKey = 'icon-id'; $artwork = '/html/images/radio.png'; + + if ( main::SLIM_SERVICE ) { + $artwork = Slim::Networking::SqueezeNetwork->url('/static/images/icons/radio.png', 'external'); + } } } else { @@ -625,6 +629,8 @@ 'type' => 'icon', 'text' => [ $status, $song ? $song->title : undef ], 'style' => $jiveIconStyle, + 'play-mode' => $playmode, + 'is-remote' => $song->isRemoteURL, }; if ( $imgKey ) { @@ -711,7 +717,7 @@ my $displayWidth = $display->displayWidth($screen2 ? 2 : 1); # check if we don't know how long the track is... - if (!Slim::Player::Source::playingSongDuration($client)) { + if (!$client->controller()->playingSongDuration()) { $showBar = 0; } @@ -783,7 +789,7 @@ my $delta = 0; my $sign = ''; - my $duration = Slim::Player::Source::playingSongDuration($client) || 0; + my $duration = $client->controller()->playingSongDuration() || 0; if (Slim::Player::Source::playmode($client) eq "stop") { $delta = 0; @@ -1004,7 +1010,7 @@ } sub isReadyToStream { - my ($client, $song) = @_; + my $client = shift; # ignore $song, $playingSong return $client->readyToStream(); } $ svn -r28402:29885 diff server/Slim/Player/Client.pm Index: server/Slim/Player/Client.pm =================================================================== --- server/Slim/Player/Client.pm (revision 28402) +++ server/Slim/Player/Client.pm (revision 29885) @@ -55,6 +55,15 @@ 'presets' => [], }; +$prefs->setValidate({ + validator => sub { + my ($pref, $new, $params, $old, $client) = @_; + + return $new <= $client->mixerConstant($pref, 'max') + && $new >= $client->mixerConstant($pref, 'min'); + } +}, qw(bass treble)); + $prefs->setChange( sub { my $value = $_[1]; my $client = $_[2] || return; @@ -124,7 +133,7 @@ curDepth lastLetterIndex lastLetterDigit lastLetterTime lastDigitIndex lastDigitTime searchFor syncSelection _playPoint playPoints jiffiesEpoch jiffiesOffsetList - _tempVolume musicInfoTextCache metaTitle languageOverride password currentSleepTime + _tempVolume musicInfoTextCache metaTitle languageOverride controlledBy password currentSleepTime sleepTime pendingPrefChanges _pluginData alarmData knobData modeStack modeParameterStack playlist chunks @@ -161,8 +170,8 @@ assert(!defined(getClient($id))); - # Ignore UUID if all zeros (bug 6899) - if ( defined $uuid && $uuid eq '0' x 32 ) { + # Ignore UUID if all zeros or many zeroes (bug 6899) + if ( defined $uuid && $uuid =~ /0000000000/ ) { $uuid = undef; } @@ -286,6 +295,7 @@ musicInfoTextCache => undef, metaTitle => undef, languageOverride => undef, + controlledBy => undef, password => undef, currentSleepTime => 0, sleepTime => 0, @@ -605,7 +615,7 @@ $currsong = 0; - Slim::Player::Source::streamingSongIndex($client,$currsong, 1); + $client->controller()->resetSongqueue($currsong); } elsif ($shuffleType eq 'album') { @@ -623,7 +633,7 @@ $currsong = Slim::Player::Playlist::count($client) - 1; } - Slim::Player::Source::streamingSongIndex($client, $currsong, 1); + $client->controller()->resetSongqueue($currsong); } $prefs->client($client)->set('currentSong', $currsong); @@ -960,7 +970,7 @@ my $sleeptime = $client->sleepTime() - Time::HiRes::time(); my $sleepstring = ""; - my $dur = Slim::Player::Source::playingSongDuration($client) || 0; + my $dur = $client->controller()->playingSongDuration() || 0; my $remaining = 0; if ($dur) { @@ -1438,18 +1448,19 @@ sub apps { my $client = shift; - my $apps; + return $prefs->client($client)->get('apps') || {}; +} + +sub isAppEnabled { + my ( $client, $app ) = @_; - if ( main::SLIM_SERVICE ) { - if ( $client->playerData ) { - $apps = $client->playerData->apps( sub { $client->string(@_) } ); - } + if ( grep { $_ eq lc($app) } keys %{ $client->apps } ) { + return 1; } - else { - $apps = $prefs->client($client)->get('apps') || {}; - } - return $apps; + return; } +sub revisionNumber { $_[0]->revision } + 1;