about summary refs log tree commit homepage
path: root/lib/dtas/player.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-09 04:45:04 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-09 04:45:04 +0000
commit0b68738511236bf6b8b8eea63a8c9ab86b8ef284 (patch)
tree57248cff83f42be3f275206268340f09c4929ecb /lib/dtas/player.rb
parent173c00415b27214b2bb67ac15359d7e50be60623 (diff)
downloaddtas-0b68738511236bf6b8b8eea63a8c9ab86b8ef284.tar.gz
We already flush the currently playing track into the head of the
queue upon player exit (even if it was in the @tl), so we should use
@tl.next_track as usual instead of @tl.cur_track in case the queue
is empty.
Diffstat (limited to 'lib/dtas/player.rb')
-rw-r--r--lib/dtas/player.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index eddaf70..a8c7fe0 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -432,7 +432,7 @@ class DTAS::Player # :nodoc:
     @srv.wait_ctl(sev, :wait_readable)
     old_chld = trap(:CHLD) { sev.signal }
     create_default_sink
-    next_source(@paused ? nil : (@queue.shift || @tl.cur_track))
+    next_source(@paused ? nil : _next)
     begin
       event_loop_iter
     rescue => e # just in case...