[banshee] [Audioscrobbler] Ignore negative increase for playtime calculation
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] [Audioscrobbler] Ignore negative increase for playtime calculation
- Date: Fri, 5 Jun 2009 14:59:02 -0400 (EDT)
commit 58746e17dc4309aa33a644c75669f6b8262fdc82
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Tue Jun 2 22:19:34 2009 +0200
[Audioscrobbler] Ignore negative increase for playtime calculation
This fixes the issue in bgo#584614. A negative increase would happen
after skipping a track, because there's an Iterate event on the new
track before the StartOfStream event for it.
---
.../AudioscrobblerService.cs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
index d951b69..6813f6d 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
@@ -186,7 +186,9 @@ namespace Banshee.Lastfm.Audioscrobbler
if (ignorenext == 0) {
increase = (ServiceManager.PlayerEngine.Position - previouspos);
- playtime += increase;
+ if (increase > 0) {
+ playtime += increase;
+ }
} else {
ignorenext--;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]