Author: bklaas
Date: Tue Jun 15 09:04:42 2010
New Revision: 8855
URL: http://svn.slimdevices.com/jive?rev=8855&view=rev
Log:
Fixed Bug: 15684
Description: never have elapsed time exceed track duration, nor remaining time
go less than zero
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.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=8855&r1=8854&r2=8855&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
Tue Jun 15 09:04:42 2010
@@ -959,10 +959,19 @@
local elapsed, duration = self.player:getTrackElapsed()
if elapsed then
- strElapsed = _secondsToString(elapsed)
- end
+ if duration and duration > 0 and elapsed > duration then
+ strElapsed = _secondsToString(duration)
+ else
+ strElapsed = _secondsToString(elapsed)
+ end
+ end
+
if elapsed and elapsed >= 0 and duration and duration > 0 then
- strRemain = "-" .. _secondsToString(duration - elapsed)
+ if elapsed > duration then
+ strRemain = "-" .. _secondsToString(0)
+ else
+ strRemain = "-" .. _secondsToString(duration - elapsed)
+ end
end
if self.progressGroup then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins