renderer: Add Next and Previous to CurrentTransportActions
authorJussi Kukkonen <jussi.kukkonen@intel.com>
Fri, 8 Nov 2013 13:29:25 +0000 (15:29 +0200)
committerJens Georg <jensg@openismus.com>
Sun, 10 Nov 2013 13:43:29 +0000 (14:43 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=711661

src/librygel-renderer/rygel-player-controller.vala

index 2b010c7..d2fc496 100644 (file)
@@ -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;
         }
     }