Author: titmuss
Date: Thu Nov 13 05:34:43 2008
New Revision: 3355

URL: http://svn.slimdevices.com?rev=3355&root=Jive&view=rev
Log:
Bug: 9915
Description:
Use a different device id for the Controller. Note needs SC r23898.


Modified:
    7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua
    
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua?rev=3355&root=Jive&r1=3354&r2=3355&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua 
(original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua Thu 
Nov 13 05:34:43 2008
@@ -20,6 +20,7 @@
 
 -- can be overridden by hardware specific classes
 local DEVICE_MODEL   = "SqueezePlay"
+local DEVICE_NAME    = "SqueezePlay"
 
 
 module(...)
@@ -30,6 +31,16 @@
        ["Controller"] = 9,
        ["SqueezePlay"] = 12,
 }
+
+
+-- class method to set the device type
+function setDeviceType(self, model, name)
+        assert(device2id[model])
+
+        DEVICE_MODEL = model
+        DEVICE_NAME = name or model
+end
+
 
 function __init(self, jnt, playerId, uuid)
        local obj = oo.rawnew(self, Player(jnt, playerId))
@@ -48,7 +59,7 @@
 
        -- initialize with default values
        obj:updateInit(nil, {
-               name = DEVICE_MODEL,
+               name = DEVICE_NAME,
                model = DEVICE_MODEL,
        })
 

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua?rev=3355&root=Jive&r1=3354&r2=3355&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua
 (original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua
 Thu Nov 13 05:34:43 2008
@@ -40,6 +40,9 @@
                settings.suspendTimeout = 3600000 -- 1 hour
        end
 
+       -- Set player device type
+       LocalPlayer:setDeviceType("Controller")
+
        -- SqueezeboxJive is a resident Applet
        appletManager:loadApplet("SqueezeboxJive")
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to