From 361ff5e65afa5a4630264a074b923c0326830993 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Fri, 8 Nov 2013 15:29:25 +0200 Subject: [PATCH] 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 file 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; } } -- 2.7.4