diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-10-08 03:04:41 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-08 03:05:21 +0000 |
commit | d131bb0964ba323eac225c888a84875c1ae8cd3d (patch) | |
tree | e80325243be17b996eb9aefa16a1a7bf302f857e | |
parent | 10b6447a38c4f82951ff137335895c9067f36bc6 (diff) | |
download | dtas-d131bb0964ba323eac225c888a84875c1ae8cd3d.tar.gz |
The player should start playing the new track if the current tracklist is exhausted and not paused.
-rw-r--r-- | lib/dtas/player/client_handler.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index ea0fc28..f313a2a 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -554,12 +554,11 @@ module DTAS::Player::ClientHandler # :nodoc: rescue ArgumentError => e return io.emit("ERR #{e.message}") end - _tl_skip if set_as_current - # start playing if we're the only track - if @tl.size == 1 && ! need_to_queue - next_source(_next) - end + _tl_skip if set_as_current # if @current is playing, it will restart soon + + # start playing if we're currently idle + next_source(_next) unless need_to_queue io.emit("#{track_id}") when "repeat" case msg.shift |