diff options
author | Eric Wong <e@80x24.org> | 2015-12-07 03:51:33 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-12-07 05:22:20 +0000 |
commit | 3e013d3f24f0f935dce985d4c6bd155889e05dbb (patch) | |
tree | 7c9dfae4dc7939265ff4abe2b906ef91a884cb19 /lib/dtas/player/client_handler.rb | |
parent | e5668a47f20a6593ab47847083bc704e1abeb1e6 (diff) | |
download | dtas-3e013d3f24f0f935dce985d4c6bd155889e05dbb.tar.gz |
This is in the MPRIS 2.0 TrackList spec and also in mpd (as "repeat" mode), so we can probably support it directly in player to ease implementations of future wrappers.
Diffstat (limited to 'lib/dtas/player/client_handler.rb')
-rw-r--r-- | lib/dtas/player/client_handler.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 0aa264f..500704a 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -584,6 +584,15 @@ module DTAS::Player::ClientHandler # :nodoc: return io.emit("repeat #{@tl.repeat.to_s}") end io.emit("OK") + when 'shuffle' + v = msg.shift + case v + when nil then io.emit("shuffle #{(!!@tl.shuffle).to_s}") + when 'debug' then io.emit(@tl.shuffle.to_yaml) # TODO: remove + else + set_bool(io, 'tl shuffle', v) { |b| @tl.shuffle = b } + io.emit('OK') + end when "remove" track_id = msg.shift or return io.emit("ERR track_id not specified") track_id = track_id.to_i |