[banshee] InternetRadio: Previous should never mean a restart (bgo#665268)



commit f1e252203622f9320080e190cfa65b0ab20b7b00
Author: Samuel Gyger <samuel gyger at>
Date:   Sun Jan 20 23:54:01 2013 +0000

    InternetRadio: Previous should never mean a restart (bgo#665268)
    
    In the context of a radio station, as it is not seekable, the button
    "PreviousOrRestart" should always mean Previous.
    
    Furthermore, simple testing seemed to suggest that Position was never
    returning the duration that the radio had already been playing
    (probably because it's a non seekable resource), so we twist the
    logic upside down to make it a bit more readable.
    
    Signed-off-by: Andres G. Aragoneses <knocte gmail com>

 .../PlaybackControllerService.cs                   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
index 19a649a..a881ef8 100644
--- a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
+++ b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
@@ -283,10 +283,10 @@ namespace Banshee.PlaybackController
         public void RestartOrPrevious (bool restart)
         {
             const int delay = 4000; // ms
-            if (player_engine.Position < delay) {
-                Previous ();
-            } else {
+            if (player_engine.CanSeek && player_engine.Position > delay) {
                 Restart ();
+            } else {
+                Previous ();
             }
         }
 



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