Author: richard
Date: Thu Feb 26 08:57:59 2009
New Revision: 4488

URL: http://svn.slimdevices.com/jive?rev=4488&view=rev
Log:
Bug: 9900
Description:
Add support for SN to squeezeplay. At the moment, only for Desktop squeezeplay, 
and at 
the moment only with the test squeezenetwork site.


Modified:
    
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua
    
7.4/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua

Modified: 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua?rev=4488&r1=4487&r2=4488&view=diff
==============================================================================
--- 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
 (original)
+++ 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
 Thu Feb 26 08:57:59 2009
@@ -142,9 +142,10 @@
 
        local currentPlayer    = appletManager:callService("getCurrentPlayer")
 
-       -- local players cannot connect to SN
-       if server and server:isSqueezeNetwork() and 
-               currentPlayer and currentPlayer:isLocal() then
+       -- Bug 9900
+       -- squeezeplay cannot connect to production SN
+       if server and server:getIpPort() == "www.squeezenetwork.com" and 
+               currentPlayer and currentPlayer:getModel() == "squeezeplay" then
                        return
        end
 

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua?rev=4488&r1=4487&r2=4488&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua (original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua Thu Feb 26 
08:57:59 2009
@@ -43,6 +43,11 @@
 oo.class(_M, System)
 
 
+function isHardware(class)
+       return (class:getMachine() ~= "squeezeplay")
+end
+
+
 -- C implementation
 
 

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua?rev=4488&r1=4487&r2=4488&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua (original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua Thu Feb 26 
08:57:59 2009
@@ -582,10 +582,14 @@
                supportedConnectionTypes = { 'streaming' },
                ext                      = {
                        rev = JIVE_VERSION,
-                       mac = System:getMacAddress(),
                        uuid = System:getUUID(),
                },
        } }
+
+       -- only send the mac address for hardware devices
+       if System:isHardware() then
+               data.ext.mac = System:getMacAddress()
+       end
 
        -- XXX: according to the spec this should be sent as 
application/x-www-form-urlencoded
        -- with message=<url-encoded json> but it works as straight JSON

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua?rev=4488&r1=4487&r2=4488&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua 
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua Thu 
Feb 26 08:57:59 2009
@@ -60,6 +60,8 @@
 -- jive.net.NetworkThread is a base class
 module(..., oo.class)
 
+local squeezenetworkHostname = "www.squeezenetwork.com"
+
 
 -- _add
 -- adds a socket to the read or write list
@@ -369,7 +371,13 @@
 =cut
 --]]
 function getSNHostname(self)
-       return "www.squeezenetwork.com"
+       return squeezenetworkHostname
+end
+
+
+-- Set the squeezenetwork hostname, used with test.squeezenetwork.com
+function setSNHostname(self, hostname)
+       squeezenetworkHostname = hostname
 end
 
 

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua?rev=4488&r1=4487&r2=4488&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua 
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua Thu Feb 
26 08:57:59 2009
@@ -452,8 +452,8 @@
        self.serverip = self.server:getIpPort()
 
        -- Bug 9900
-       -- Don't allow connections to SN yet
-       assert(not string.match(self.serverip, "squeezenetwork.com"))
+       -- Don't allow connections to production SN yet
+       assert(not string.match(self.serverip, "www.squeezenetwork.com"))
 
        self.socket = SocketTcp(self.jnt, self.serverip, PORT, "SlimProto")
 

Modified: 
7.4/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua?rev=4488&r1=4487&r2=4488&view=diff
==============================================================================
--- 
7.4/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
 (original)
+++ 
7.4/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
 Thu Feb 26 08:57:59 2009
@@ -80,6 +80,9 @@
                uuid = settings.uuid,
        })
 
+       -- Bug 9900
+       -- Use SN test during development
+       jnt:setSNHostname("test.squeezenetwork.com")
        
        appletManager:addDefaultSetting("ScreenSavers", "whenStopped", 
"false:false")
        appletManager:addDefaultSetting("Playback", "enableAudio", 1)

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

Reply via email to