'system:hasSoftPower' seems to refer to the device that Jivelite is
running on - I found this in system.lua:

Code:
--------------------
    function hasSoftPower(self)
        return ( self:hasTouch() or self:hasPowerKey() )
  end
--------------------


With my reconfigured screensaver applet I don't think it matters whether
the controlling device has a power button - it doesn't seem relevant if
I'm triggering the screensaver according to the status of the currently
selected player, which can be changed from any number of external
interfaces.

So I simplified the _getMode function:

Code:
--------------------
    function _getMode(self)
        local player = appletManager:callService("getCurrentPlayer")
        
        if player then
                if not player:isPowerOn() then
                        return 'whenOff'
                else
                        if player:getPlayMode() == "play" then
                                return 'whenPlaying'
                        end
                end
        end
        return 'whenStopped'
  end
  
--------------------


This function only cares whether the current player is powered on/off or
playing, and returns 'whenStopped' otherwise (even if no player is
selected).  For a device that is principally a controller, it seems to
work more intuitively now, and doesn't distinguish between a local
player and other players.


------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=110135

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

Reply via email to