diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-09-09 04:45:04 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-09-09 04:45:04 +0000 |
commit | 0b68738511236bf6b8b8eea63a8c9ab86b8ef284 (patch) | |
tree | 57248cff83f42be3f275206268340f09c4929ecb | |
parent | 173c00415b27214b2bb67ac15359d7e50be60623 (diff) | |
download | dtas-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.
-rw-r--r-- | lib/dtas/player.rb | 2 |
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... |