[banshee/gapless-ng: 16/836] [Banshee.InternetRadio] (Badly) Handle userRequested=False in Next(). It should be possible to handl



commit 0da66d7ff7d67db713ec3082770216a0c47263e1
Author: Christopher James Halse Rogers <raof ubuntu com>
Date:   Mon Jul 20 13:40:54 2009 +1000

    [Banshee.InternetRadio] (Badly) Handle userRequested=False in Next().
    It should be possible to handle this properly, but requires crawling a fairly deep callstack.

 .../Banshee.InternetRadio/InternetRadioSource.cs   |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
index 51b82cd..e066c5d 100644
--- a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
+++ b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
@@ -281,6 +281,18 @@ namespace Banshee.InternetRadio
         
         public bool Next (bool restart, bool userRequested)
         {
+            /*
+             * TODO: It should be technically possible to handle userRequested=False
+             * correctly here, but the current implementation is quite hostile.
+             * For the moment, just SetNextTrack (null), and go on to OpenPlay if
+             * the engine isn't currently playing.
+             */
+            if (!userRequested) {
+                ServiceManager.PlayerEngine.SetNextTrack ((SafeUri)null);
+                if (ServiceManager.PlayerEngine.IsPlaying ()) {
+                    return true;
+                }
+            }
             RadioTrackInfo radio_track = ServiceManager.PlaybackController.CurrentTrack as RadioTrackInfo;
             if (radio_track != null && radio_track.PlayNextStream ()) {
                 return true;



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