[banshee] [PlaybackController] Fix repeating same song



commit 292437afa4244667a3c51e3b99f97f209d35ac81
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Mar 10 20:08:28 2010 -0800

    [PlaybackController] Fix repeating same song
    
    When we get StartOfStream in the PlaybackController, set its
    CurrentTrack to the PlayerEngine's.  This is necessary eg when the user
    starts playback by double-clicking a track.

 .../PlaybackControllerService.cs                   |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
index f62c918..c65153a 100644
--- a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
+++ b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
@@ -129,6 +129,7 @@ namespace Banshee.PlaybackController
         {
             switch (args.Event) {
                 case PlayerEvent.StartOfStream:
+                    CurrentTrack = player_engine.CurrentTrack;
                     consecutive_errors = 0;
                     break;
                 case PlayerEvent.EndOfStream:
@@ -297,7 +298,8 @@ namespace Banshee.PlaybackController
         {
             if (Source.Count > 0) {
                 if (ShuffleMode == "off") {
-                    player_engine.OpenPlay (Source.TrackModel[0]);
+                    CurrentTrack = Source.TrackModel[0];
+                    player_engine.OpenPlay (CurrentTrack);
                 } else {
                     ((IBasicPlaybackController)this).Next (false, true);
                 }



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