diff options
Diffstat (limited to 'lib/dtas')
-rw-r--r-- | lib/dtas/player/client_handler.rb | 6 | ||||
-rw-r--r-- | lib/dtas/tracklist.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 4827840..1c0a79e 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -676,6 +676,12 @@ module DTAS::Player::ClientHandler # :nodoc: io.emit('OK') end + def _dpc_tl_clear(io, msg) + @tl.clear + _tl_skip + io.emit('OK') + end + def __bp_prev_next(io, msg, cur, bp) case type = msg[1] when nil, "track" diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb index b1cdc1e..b9abe55 100644 --- a/lib/dtas/tracklist.rb +++ b/lib/dtas/tracklist.rb @@ -195,6 +195,12 @@ class DTAS::Tracklist # :nodoc: track.to_path end + def clear + @list.clear + @shuffle.clear if @shuffle + reset + end + def go_to(track_id, offset_hhmmss = nil) list = @shuffle || @list if idx = _idx_of(list, track_id) |