Would all this be easier if ReallyPreventStandby had a CLI request
like:

reallypreventstandby isidle

..returning 1 for yes and 0 for no?

I would think that that would make the script that SleepWatcher has to
execute much simpler...something along the lines of:


Code:
--------------------
    
  #!/bin/bash
  
  SBSHOST=127.0.0.1
  CLIPORT=9090
  
  function SBSIsIdle {
  nc $SBSHOST $CLIPORT <<EOF0
  reallypreventstandby isidle
  exit
  EOF0
  }
  
  
  ISIDLE=`SBSIsIdle`
  
  if [ "$ISIDLE" == 1 ]
  then
  echo 'Idle..'
  echo $ISIDLE
  exit 0
  else
  echo 'Not idle..'
  echo $ISIDLE
  exit 1
  fi 
  
  
--------------------


This way ReallyPreventStandby can do all the heavy lifting: monitoring
player states, keeping track of the idle time-out, watching for library
rescans, watching for firmware updates, etc, etc.

Probably the script will still need to use telnet and expect rather
than nc since I don't see any way to make nc work with the 'login' CLI
request.


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to