[banshee] [PlayQueue] Make Play After Current Track work while playing songs from sources other than the play



commit f5b0054d57c4fdbae3bd00964f6cb8d233158127
Author: Alex Launi <alex launi gmail com>
Date:   Thu Oct 21 23:35:33 2010 -0400

    [PlayQueue] Make Play After Current Track work while playing songs from sources other than the play queue

 .../Banshee.PlayQueue/PlayQueueSource.cs           |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
index f17facc..59c30ea 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
@@ -376,9 +376,12 @@ namespace Banshee.PlayQueue
 
             switch (mode) {
             case QueueMode.AfterCurrentTrack:
-                // view_order will point to the currently playing track.
+                // view_order will point to the currently playing track, or if we're playing from
+                // somewhere besides the play queue it will point to the very top of the queue.
                 // We want to insert tracks after this one.
-                view_order = current_view_order;
+                view_order = ServiceManager.PlaybackController.Source is PlayQueueSource
+                    ? current_view_order
+                    : current_view_order - 1;
                 break;
             case QueueMode.AfterCurrentAlbum:
                 // view order will point to the last track of the currently



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