[banshee/gapless-ng: 15/836] [Banshee.Lastfm] Correctly handle userRequested=False in Next ()



commit 06709643c094a7705850081eb3e162d9a9dda3a3
Author: Christopher James Halse Rogers <raof ubuntu com>
Date:   Mon Jul 20 12:53:06 2009 +1000

    [Banshee.Lastfm] Correctly handle userRequested=False in Next ()

 .../Banshee.Lastfm.Radio/StationSource.cs          |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
index 6b27d43..bf3651e 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
@@ -301,10 +301,17 @@ namespace Banshee.Lastfm.Radio
         bool IBasicPlaybackController.Next (bool restart, bool userRequested)
         {
             TrackInfo next = NextTrack;
-            if (next != null) {
-                ServiceManager.PlayerEngine.OpenPlay (next);
-            }  else {
-                playback_requested = true;
+            if (userRequested) {
+                if (next != null) {
+                    ServiceManager.PlayerEngine.OpenPlay (next);
+                }  else {
+                    playback_requested = true;
+                }
+            } else {
+                // We want to unconditionally SetNextTrack.
+                // Passing null is OK.
+                ServiceManager.PlayerEngine.SetNextTrack (next);
+                playback_requested = next == null;
             }
             return true;
         }



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