[banshee] DatabaseTrackInfo: Fix rating update on current track (bgo#623183)



commit 9d32155c45070ebe51186d87d099dd6dc536a64d
Author: Mackenan Grassi <mackenan gmail com>
Date:   Sun Mar 13 09:53:33 2011 -0700

    DatabaseTrackInfo: Fix rating update on current track (bgo#623183)
    
    This will allow the current TrackInfo to get updated when the rating is
    set directly from any rating widget. Prior to this, current TrackInfo
    was not updated if rating was set through a ColumnCellRating.
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 .../DatabaseTrackInfo.cs                           |    4 ++++
 1 files changed, 4 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 f4d65e9..6cc0d62 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
@@ -640,6 +640,10 @@ namespace Banshee.Collection.Database
                 if (rating != value) {
                     rating = value;
                     Save (true, BansheeQuery.RatingField);
+                    if (TrackEqual (ServiceManager.PlayerEngine.CurrentTrack)) {
+                        ServiceManager.PlayerEngine.CurrentTrack.Rating = value;
+                        ServiceManager.PlayerEngine.TrackInfoUpdated ();
+                    }
                 }
             }
         }



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