Index: /home/peterw/tmp/Slimserver-SVN/Slim/Hardware/IR.pm =================================================================== --- /home/peterw/tmp/Slimserver-SVN/Slim/Hardware/IR.pm (revision 16424) +++ /home/peterw/tmp/Slimserver-SVN/Slim/Hardware/IR.pm (working copy) @@ -664,8 +664,25 @@ $log->info("$irCodeBytes\t$irTime\t" . Time::HiRes::time()); } + # treat front-panel button on Receiver specially + if ( $client->isa("Slim::Player::Receiver") ) { + $log->info("Receiver button pressed"); + # if synced, treat the front panel button as "power" so the sync group doesn't stop playing + # also treat as power if off + if ( (!$client->power()) || (scalar(@{$client->slaves}) > 0) || ($client->masterOrSelf ne $client) ) { + $log->info("Receiver off or synced with one or more others, treating button as power button"); + if ($code =~ /(.*?)\.(up|down)$/) { + my ($major, $minor) = ($1, $2); + $code = "power.$minor"; + # the following is ugly, but since the Receiver IR code is hardwired in + # its firmware, maybe it's OK... + if ( $minor eq 'up' ) { $irCodeBytes = '0002000a'; } + else { $irCodeBytes = '0001000a'; } + } + } + } + if ($code =~ /(.*?)\.(up|down)$/) { - $log->info("Front panel code detected, processing $code"); $client->startirhold($irTime);