Author: bklaas
Date: Sun Mar 2 20:40:08 2008
New Revision: 2086
URL: http://svn.slimdevices.com?rev=2086&root=Jive&view=rev
Log:
Bug: 7370
Description: Deal with race condition between player power and player mode so
Now Playing reports power/mode in title properly
Add getPlayerMode method to Player.lua
Modified:
trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
Modified:
trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL:
http://svn.slimdevices.com/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=2086&root=Jive&r1=2085&r2=2086&view=diff
==============================================================================
---
trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
(original)
+++
trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
Sun Mar 2 20:40:08 2008
@@ -421,11 +421,19 @@
end
function _updateMode(self, mode, ws)
- if not ws then ws = self[windowStyle] end
- if not ws then return end
+ if not ws then
+ ws = self[windowStyle]
+ end
+
+ if not ws then
+ return
+ end
+
local power = self.player:getPlayerPower()
local token = mode
- if power == 0 then
+ -- sometimes there is a race condition here between updating player
mode and power,
+ -- so only set the title to 'off' if the mode is also not 'play'
+ if token != 'play' and power == 0 then
token = 'off'
end
if ws.titleGroup then
Modified: trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=2086&root=Jive&r1=2085&r2=2086&view=diff
==============================================================================
--- trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Sun Mar 2
20:40:08 2008
@@ -388,6 +388,18 @@
--]]
function getPlaylistSize(self)
return tonumber(self.playlistSize)
+end
+
+--[[
+
+=head2 jive.slim.Player:getPlayerMode()
+
+returns the playerMode for a given player object
+
+=cut
+--]]
+function getPlayerMode(self)
+ return self.mode
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins