about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-11 21:56:51 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-11 21:56:51 +0000
commit4742599c6801c25b00a2233086ae2f1091eac675 (patch)
treed97d37bcea439a963500eac562cdc73064855f94
parent699a1217fbfa06b0cde58e4430a35825c384167f (diff)
downloaddtas-4742599c6801c25b00a2233086ae2f1091eac675.tar.gz
When a player is idle and a track is added to an empty tracklist,
we should not repeat the first track added to the tracklist.  Avoid
that by advancing the tracklist to the current track.
-rw-r--r--lib/dtas/player/client_handler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb
index 70d992b..9c28486 100644
--- a/lib/dtas/player/client_handler.rb
+++ b/lib/dtas/player/client_handler.rb
@@ -540,7 +540,7 @@ module DTAS::Player::ClientHandler # :nodoc:
 
       # start playing if we're the only track
       if @tl.size == 1 && !(@current || @queue[0] || @paused)
-        next_source(path)
+        next_source(_next)
       end
       io.emit("#{track_id}")
     when "repeat"