[banshee] [PlayQueue] Record manually added/discarded songs
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [PlayQueue] Record manually added/discarded songs
- Date: Wed, 3 Mar 2010 21:49:24 +0000 (UTC)
commit 005eb60fb1000fa44aa3a9d8eef47a61c57d3d56
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Mar 2 23:32:06 2010 -0800
[PlayQueue] Record manually added/discarded songs
Will give RandomBy modes access to more information from which they can
derive their shuffles. Fill-by-similar will probably use discarded
(removed) songs as anti-seeds (eg avoid songs similar to these).
.../Banshee.PlayQueue/PlayQueueSource.cs | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
index 595c7cf..e8d6ed6 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
@@ -235,6 +235,8 @@ namespace Banshee.PlayQueue
DbId, trackId, view_order, generated ? 1 : 0
);
+ shuffler.RecordShuffle (trackId);
+
OnTracksAdded ();
NotifyUser ();
}
@@ -288,6 +290,8 @@ namespace Banshee.PlayQueue
DbId, current_view_order
));
+ WithTrackSelection (model, shuffler.RecordShuffles);
+
// Add the tracks to the end of the queue.
WithTrackSelection (model, AddTrackRange);
@@ -436,6 +440,7 @@ namespace Banshee.PlayQueue
protected override void RemoveTrackRange (DatabaseTrackListModel model, RangeCollection.Range range)
{
+ shuffler.RecordDiscards (model, range);
base.RemoveTrackRange (model, range);
model.Selection.UnselectRange (range.Start, range.End);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]