[banshee] Notify primary sources on rating change
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Notify primary sources on rating change
- Date: Sun, 2 Oct 2011 13:16:52 +0000 (UTC)
commit dc07b15b831d242202bc81686ca94cf562bef15d
Author: Alexander Kojevnikov <alexk gnome org>
Date: Sun Oct 2 21:09:10 2011 +0800
Notify primary sources on rating change
Without this change smart play lists are not updated when the rating
is set via D-Bus or --set-rating.
.../Banshee.MediaEngine/PlayerEngineService.cs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs b/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs
index 57331eb..a0ed399 100644
--- a/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs
+++ b/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs
@@ -38,6 +38,8 @@ using Hyena;
using Banshee.Base;
using Banshee.Streaming;
using Banshee.ServiceStack;
+using Banshee.Sources;
+using Banshee.Query;
using Banshee.Metadata;
using Banshee.Configuration;
using Banshee.Collection;
@@ -696,6 +698,13 @@ namespace Banshee.MediaEngine
if (CurrentTrack != null) {
CurrentTrack.Rating = (int)Math.Min (5u, value);
CurrentTrack.Save ();
+
+ foreach (var source in ServiceManager.SourceManager.Sources) {
+ var psource = source as PrimarySource;
+ if (psource != null) {
+ psource.NotifyTracksChanged (BansheeQuery.RatingField);
+ }
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]