[banshee/stable-1.6] [gapless] Fix rating resets (bgo#614863)



commit 35a0d35d5b2d22686fe7e7fd2d5c0b53265be13f
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Sat Apr 17 14:47:53 2010 +1000

    [gapless] Fix rating resets (bgo#614863)
    
    When UpdateLastPlayed is called from OnAboutToFinish, it saves the
    currently played track to the database. The problem is that the playing
    track and the rated track are different objects, the playing track
    still has the original rating value.
    
    This commit refreshes the track before updating and saving, which
    brings its properties up-to-date.

 .../DatabaseTrackInfo.cs                           |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
index 41ff4b1..f07b07f 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
@@ -159,6 +159,7 @@ namespace Banshee.Collection.Database
 
         public override void UpdateLastPlayed ()
         {
+            Refresh ();
             base.UpdateLastPlayed ();
             Save (NotifySaved, BansheeQuery.LastPlayedField);
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]