Author: bklaas
Date: Wed Mar  3 07:53:40 2010
New Revision: 8622

URL: http://svn.slimdevices.com/jive?rev=8622&view=rev
Log:
Fixed Bug: 15814
Description: store waitingToPlay flag in player object after playerstatus update
do not update position or progress bar in NowPlaying when 
Player.isWaitingToPlay() returns true

Modified:
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
    7.5/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=8622&r1=8621&r2=8622&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 Wed Mar  3 07:53:40 2010
@@ -773,6 +773,11 @@
        local strRemain = ""
        local pos = 0
 
+       -- Bug 15814: do not update position if track isn't actually playing
+       if self.player:isWaitingToPlay() then
+               log:debug('track is waiting to play, do not update progress 
bar')
+               return
+       end
        local elapsed, duration = self.player:getTrackElapsed()
 
        if elapsed then

Modified: 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=8622&r1=8621&r2=8622&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Wed Mar  3 
07:53:40 2010
@@ -1199,6 +1199,8 @@
        self.definedPresets = event.data.preset_loop
        -- alarm snooze seconds for player, defaults to 540
        self.alarmSnoozeSeconds = event.data.alarm_snooze_seconds
+       -- Bug 15814: flag for when the audio hasn't started streaming yet but 
mode is play
+       self.waitingToPlay = event.data.waitingToPlay or false
 
        -- update our player state, and send notifications
        -- create a playerInfo table, to allow code reuse
@@ -1473,6 +1475,11 @@
 end
 
 
+function isWaitingToPlay(self)
+       return self.waitingToPlay
+end
+
+
 function getAlarmState(self)
        return self.alarmState
 end

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

Reply via email to