diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-09-09 04:32:53 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-09-09 04:35:55 +0000 |
commit | df66dbd4594527ce5e6e8315c6775c9dbdd12dc1 (patch) | |
tree | 4b0a1ab4bc78830ea8d89d802145f5a9305593cd /lib/dtas/player/client_handler.rb | |
parent | 59ca3ba986e1f872d851b9b6ce588e20d8020243 (diff) | |
download | dtas-df66dbd4594527ce5e6e8315c6775c9dbdd12dc1.tar.gz |
This allows easier scripting if we want to add a bunch of tracks
Diffstat (limited to 'lib/dtas/player/client_handler.rb')
-rw-r--r-- | lib/dtas/player/client_handler.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 2966193..7a63df1 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -527,7 +527,7 @@ module DTAS::Player::ClientHandler # :nodoc: return io.emit("ERR tl add PATH [after_track_id] [true|false]") end begin - @tl.add_track(path, after_track_id, set_as_current) + track_id = @tl.add_track(path, after_track_id, set_as_current) rescue ArgumentError => e return io.emit("ERR #{e.message}") end @@ -537,7 +537,7 @@ module DTAS::Player::ClientHandler # :nodoc: if @tl.size == 1 && !(@current || @queue[0] || @paused) next_source(path) end - io.emit("OK") + io.emit("#{track_id}") when "repeat" case msg.shift when "true" then @tl.repeat = true |