Apesbrain wrote: 
> Here's one I found and once used.  Copy to a batch file named as you
> please.  You have to find a way to call that file from within LMS.  I
> think this capability exists within "Server Power Control" plugin which
> I was also using at that time.  IIRC, it showed up in both web GUI and
> mobile app.
> 

For unix based players this will send the pause command to all players
(and no need to know the player IPs).. You could adapt this to send
poweroff instead.


Code:
--------------------
    
  #!/bin/bash
  ##
  ## Slightly Intelligent script to pause all playing squeezebox players.
  
  LMSHOST=<lms server IP>
  
  # Get number of players
  PLAYERS=`/bin/echo -e "player count ?\nexit\n" | nc ${LMSHOST} 9090 | awk 
'{print $NF}'`
  
  while [ $(( PLAYERS-- )) -gt 0 ] ; do
  
        ID=`/bin/echo -e "player id "$PLAYERS" ?\nexit\n" | nc ${LMSHOST} 9090 
| awk '{print $NF}'`
        MODE=`/bin/echo -e $ID" mode ?\nexit\n" | nc ${LMSHOST} 9090 | awk 
'{print $NF}'`
  
        if [ $MODE == "play" ] ; then
                /bin/echo "Forcing pause on player ID "$ID
                /bin/echo -e $ID" pause 1\nexit\n" | nc ${LMSHOST} 9090
        fi
  
  done
  
--------------------



--
Hardware: 3x Touch, 1x Radio, 2x Receivers, 1 HP Microserver NAS with
Debian+LMS 7.9.0
Music: ~1300 CDs, as 450 GB of 16/44k FLACs. No less than 3x 24/44k
albums..
------------------------------------------------------------------------
drmatt's Profile: http://forums.slimdevices.com/member.php?userid=59498
View this thread: http://forums.slimdevices.com/showthread.php?t=109032

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

Reply via email to