[rygel/rygel-0-20] renderer: Add Next and Previous to CurrentTransportActions



commit 0108939084b9ecde9676e335886309becebdc956
Author: Jussi Kukkonen <jussi kukkonen intel com>
Date:   Fri Nov 8 15:29:25 2013 +0200

    renderer: Add Next and Previous to CurrentTransportActions
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711661

 src/librygel-renderer/rygel-player-controller.vala |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/librygel-renderer/rygel-player-controller.vala 
b/src/librygel-renderer/rygel-player-controller.vala
index 2b010c7..d2fc496 100644
--- a/src/librygel-renderer/rygel-player-controller.vala
+++ b/src/librygel-renderer/rygel-player-controller.vala
@@ -92,7 +92,19 @@ internal class Rygel.PlayerController : Object {
                 default:
                     break;
             }
-            if (actions != null && this.player.can_seek) {
+
+            if (actions == null) {
+                return "";
+            }
+
+            if (this.track < this.n_tracks) {
+                actions += ",Next";
+            }
+            if (this.track > 1) {
+                actions += ",Previous";
+            }
+
+            if (this.player.can_seek) {
                 actions += ",X_DLNA_SeekTime";
 
                 string play_speeds = "";
@@ -108,10 +120,6 @@ internal class Rygel.PlayerController : Object {
                 actions += play_speeds;
             }
 
-            if (actions == null) {
-                return "";
-            }
-
             return actions;
         }
     }


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