------------------------------------------------------------------------
A poll associated with this post was created, to vote and see the
results, please visit http://forums.slimdevices.com/showthread.php?t=116649
------------------------------------------------------------------------
Question: On what player types does the alarm fail for you?
    
- Squeezebox Radio (official firmware 7.x) 
- Squeezebox Radio (community firmware 8.x) 
- Squeezebox Touch (official firmware 7.x) 
- Squeezebox Touch (community firmware 8.x) 
- SB Classic/Boom/Receiver/Transporter 
- Other (eg. Raspberry Pi based)
------------------------------------------------------------------------

mherger wrote: 
> Rather than just blocking player-refs notifications we should probably
> just ignore any player specific notification:
> 
> > 
Code:
--------------------
  >   > diff --git a/Slim/Utils/Alarm.pm b/Slim/Utils/Alarm.pm
  > index e6acade08..abf4be8a6 100644
  > --- a/Slim/Utils/Alarm.pm
  > +++ b/Slim/Utils/Alarm.pm
  > @@ -1982,6 +1982,11 @@ sub _alarmEnd {
  > main::DEBUGLOG && $isDebug && $log->debug('Ignoring self-created request');
  > return;
  > }
  > +       elsif ($source && $source !~ m|^/[a-z0-9]+/slim/request| && $source 
=~ m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]:){5}[0-9a-f]|i) {
  > +               warn Data::Dump::dump($request, 'Alarm: ignored event');
  > +               main::DEBUGLOG && $isDebug && $log->debug('Ignoring 
notification to subscriber');
  > +               return;
  > +       }
  > elsif ($source) {
  > warn Data::Dump::dump($request, 'Alarm: fired event');
  > $log->error("Unknown source: $source");
  > 
--------------------
> > 
> 
> Would anybody be able to apply this and test? I think that (most)
> interactive actions taken by a user would be `/abc213/slim/request`,
> whereas notification come with a MAC address in the source element. As
> notifications already are in response to some action we should ignore
> them.

I actually think that the MAC address is included in the source string
when the associated session is controlling a different device, i.e.
other than itself. This regex might thus block legit actions to stop the
alarm from e.g. Controller.

Also not completely unimportant, `index()` is more CPU friendly than
regex, even if the latter is applied with fixed strings.


------------------------------------------------------------------------
gordonb3's Profile: http://forums.slimdevices.com/member.php?userid=71050
View this thread: http://forums.slimdevices.com/showthread.php?t=116649

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to