Index: squeezeplay/share/jive/net/NetworkThread.lua =================================================================== --- squeezeplay/share/jive/net/NetworkThread.lua (revision 7817) +++ squeezeplay/share/jive/net/NetworkThread.lua (working copy) @@ -51,6 +51,7 @@ local perfhook = jive.perfhook +local JIVE_VERSION = jive.JIVE_VERSION local EVENT_SERVICE_JNT = jive.ui.EVENT_SERVICE_JNT local EVENT_CONSUME = jive.ui.EVENT_CONSUME @@ -60,7 +61,7 @@ -- jive.net.NetworkThread is a base class module(..., oo.class) -local squeezenetworkHostname = "www.squeezenetwork.com" +local squeezenetworkHostname = false -- _add @@ -371,13 +372,28 @@ =cut --]] function getSNHostname(self) + if squeezenetworkHostname then + return squeezenetworkHostname + end + + local type = System:getMachine() + if not type then + log:error("No system type") + end + + local maj,min,rel = string.match(JIVE_VERSION, "^(%d+)%.(%d+)%.(%d+)") + + squeezenetworkHostname = table.concat({ rel, min, maj, type, "r", "mysqueezebox", "com"}, ".") + + log:info("SN hostname:", squeezenetworkHostname) + return squeezenetworkHostname end -- Set the squeezenetwork hostname, used with test.squeezenetwork.com function setSNHostname(self, hostname) - squeezenetworkHostname = hostname + -- deprecated end Index: squeezeplay/share/jive/net/SlimProto.lua =================================================================== --- squeezeplay/share/jive/net/SlimProto.lua (revision 7817) +++ squeezeplay/share/jive/net/SlimProto.lua (working copy) @@ -420,9 +420,9 @@ end serverip = self.lastServerip elseif serverip == 1 then - serverip = "www.squeezenetwork.com" + serverip = self.jnt:getSNHostname() elseif serverip == 2 then - serverip = "www.test.squeezenetwork.com" + serverip = "www.test.mysqueezebox.com" else serverip = _ipstring(serverip) end Index: squeezeplay/share/jive/slim/Player.lua =================================================================== --- squeezeplay/share/jive/slim/Player.lua (revision 7817) +++ squeezeplay/share/jive/slim/Player.lua (working copy) @@ -1753,9 +1753,9 @@ if server:isSqueezeNetwork() then local sn_hostname = jnt:getSNHostname() - if string.match(sn_hostname, ".*test.squeezenetwork.com$") then + if string.match(sn_hostname, ".*test.mysqueezebox.com$") then data.server_address = Udap.packNumber(2, 4) - elseif string.match(sn_hostname, ".*squeezenetwork.com$") then + elseif string.match(sn_hostname, ".*mysqueezebox.com$") then data.server_address = Udap.packNumber(1, 4) -- XXXX testing only REMOVE ME! Index: squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyMeta.lua =================================================================== --- squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyMeta.lua (revision 7817) +++ squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyMeta.lua (working copy) @@ -74,9 +74,6 @@ -- System sound effects attenuation Sample:setEffectAttenuation(Sample.MAXVOLUME / 25) - -- SN hostname - jnt:setSNHostname("baby.squeezenetwork.com") - -- BSP is a resident Applet appletManager:loadApplet("SqueezeboxBaby") Index: squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua =================================================================== --- squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua (revision 7817) +++ squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua (working copy) @@ -94,9 +94,6 @@ uuid = settings.uuid, }) - -- SN hosthame - jnt:setSNHostname("jive.squeezenetwork.com") - appletManager:addDefaultSetting("ScreenSavers", "whenStopped", "false:false") appletManager:addDefaultSetting("Playback", "enableAudio", 1) Index: squeezeplay_fab4/share/applets/SqueezeboxFab4/SqueezeboxFab4Meta.lua =================================================================== --- squeezeplay_fab4/share/applets/SqueezeboxFab4/SqueezeboxFab4Meta.lua (revision 7817) +++ squeezeplay_fab4/share/applets/SqueezeboxFab4/SqueezeboxFab4Meta.lua (working copy) @@ -67,9 +67,6 @@ -- System sound effects attenuation Sample:setEffectAttenuation(Sample.MAXVOLUME) - -- SN hosthame - jnt:setSNHostname("fab4.squeezenetwork.com") - -- BSP is a resident Applet appletManager:loadApplet("SqueezeboxFab4") Index: squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua =================================================================== --- squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua (revision 7817) +++ squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveMeta.lua (working copy) @@ -72,9 +72,6 @@ -- Set player device type LocalPlayer:setDeviceType("controller", "Controller") - -- SH hostname - jnt:setSNHostname("jive.squeezenetwork.com") - -- Set the minimum support server version SlimServer:setMinimumVersion("7.0")