diff options
author | Eric Wong <e@80x24.org> | 2015-12-31 01:56:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-12-31 01:57:25 +0000 |
commit | a86268bfee552912d1e460989581f3634d39a824 (patch) | |
tree | 6f896f0ee2f75f745065566309e6ae7cc7e2fdc9 /lib/dtas | |
parent | 68be73fd5723d9c47d395be5ab251d04901aa2d2 (diff) | |
download | dtas-a86268bfee552912d1e460989581f3634d39a824.tar.gz |
When invoking the "current" command, the player now returns the first track + offset in the queue. This should make it easier to show what's paused or not.
Diffstat (limited to 'lib/dtas')
-rw-r--r-- | lib/dtas/player/client_handler.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 121135b..6167fcb 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -302,7 +302,9 @@ module DTAS::Player::ClientHandler # :nodoc: tmp["current_inflight"] = @sink_buf.inflight tmp["format"] = @format.to_hash.delete_if { |_,v| v.nil? } tmp["bypass"] = @bypass.sort! - tmp["paused"] = @paused + if tmp['paused'] = @paused + first = @queue[0] and tmp['current_paused'] = first + end rg = @rg.to_hsh tmp["rg"] = rg unless rg.empty? if @targets[0] |