[rygel] renderer: Add Next and Previous to CurrentTransportActions



commit 361ff5e65afa5a4630264a074b923c0326830993
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]