Author: titmuss
Date: Mon Feb 4 02:09:52 2008
New Revision: 1773
URL: http://svn.slimdevices.com?rev=1773&root=Jive&view=rev
Log:
Bug: 6764
Description:
Fix entering the SN pin when upgrading from the MP firmware releases.
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/SlimDiscovery/SlimDiscoveryMeta.lua
branches/7.0/jive/src/pkg/jive/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/SlimDiscovery/SlimDiscoveryMeta.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/SlimDiscovery/SlimDiscoveryMeta.lua?rev=1773&root=Jive&r1=1772&r2=1773&view=diff
==============================================================================
---
branches/7.0/jive/src/pkg/jive/share/applets/SlimDiscovery/SlimDiscoveryMeta.lua
(original)
+++
branches/7.0/jive/src/pkg/jive/share/applets/SlimDiscovery/SlimDiscoveryMeta.lua
Mon Feb 4 02:09:52 2008
@@ -15,12 +15,15 @@
=cut
--]]
-
local oo = require("loop.simple")
local AppletMeta = require("jive.AppletMeta")
+local debug = require("jive.utils.debug")
+local log = require("jive.utils.log").logger("applets.setup")
+
local appletManager = appletManager
+local jnt = jnt
module(...)
@@ -40,9 +43,47 @@
function registerApplet(self)
-
+ local settings = self:getSettings()
+
-- SlimDiscovery is a resident Applet
- appletManager:loadApplet("SlimDiscovery")
+ local slimDiscovery = appletManager:loadApplet("SlimDiscovery")
+
+ -- With the MP firmware when SqueezeNetwork is selected a dummy player
with an ff mac
+ -- address is selected, and then a firmware update starts. When this
mac address is seen
+ -- after the upgrade we need to push the choose player and
squeezenetwork pin menus
+ if settings.currentPlayer == "ff:ff:ff:ff:ff:ff" then
+ log:info("SqueezeNetwork dummy player found")
+
+ -- change to a non-existant player to prevent browser connecting
+ settings.currentPlayer = "ff:ff:ff:ff:ff:fe"
+
+ -- wait until SN is connected so we know the PIN
+ local monitor = {
+ notify_playerNew =
+ function(self, player)
+ if player:getId() ~=
"ff:ff:ff:ff:ff:ff" then
+ return
+ end
+
+ -- unsubscribe monitor from future
events
+ jnt:unsubscribe(self)
+
+ -- push Choose Player menu
+ local selectPlayer =
appletManager:loadApplet("SelectPlayer")
+ if selectPlayer then
+
selectPlayer:setupShow(function() end)
+ end
+
+ -- push Active Squeezenetwork
+ local snPin =
appletManager:loadApplet("SqueezeNetworkPIN")
+ if snPin then
+ snPin:forcePin(player)
+ end
+ end
+ }
+
+ jnt:subscribe(monitor)
+ end
end
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua?rev=1773&root=Jive&r1=1772&r2=1773&view=diff
==============================================================================
---
branches/7.0/jive/src/pkg/jive/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua
(original)
+++
branches/7.0/jive/src/pkg/jive/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua
Mon Feb 4 02:09:52 2008
@@ -17,20 +17,7 @@
end
function registerApplet(meta)
- -- check for SN PIN when we connect to a new player
- local monitor = {
- notify_playerCurrent =
- function(self, player)
-
- if player and player:getPin() then
- log:debug("SqueezeNetworkPIN: player
has a PIN")
- local applet =
appletManager:loadApplet("SqueezeNetworkPIN")
- applet:forcePin(player)
- end
- end
- }
-
- jnt:subscribe(monitor)
+ -- do nothing
end
--[[
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins