From 72bdee181ad5d95f1925d3abedd7f860101a75d3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Sep 2013 07:51:06 +0000 Subject: player: implement previous/next commands This means we can go back and forth in the tracklist like a normal music player. This will allow an easier MPRIS 2.0 implementation. --- lib/dtas/player/client_handler.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/dtas/player/client_handler.rb') diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 355451d..33cae05 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -583,6 +583,13 @@ module DTAS::Player::ClientHandler # :nodoc: when "current-id" path = @tl.cur_track io.emit(path ? path.object_id.to_s : "NONE") + when "next" + _tl_skip + io.emit("OK") + when "previous" + @tl.previous! + _tl_skip + io.emit("OK") end end end -- cgit v1.2.3-24-ge0c7