diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-10-06 07:10:33 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-06 07:10:33 +0000 |
commit | b991345ff960229347b32eb1bfe9d7732441c19e (patch) | |
tree | 173ba0e26f23ae4ab6aadf58a2195d2394fc772a /lib | |
parent | 31bbc429f7563120a4be600b90fb1e5574e4b2a1 (diff) | |
download | dtas-b991345ff960229347b32eb1bfe9d7732441c19e.tar.gz |
This prevents us from resetting the tracklist when we add new tracks and want to restart playback.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dtas/player.rb | 1 | ||||
-rw-r--r-- | lib/dtas/player/client_handler.rb | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index f94c575..56fbdac 100644 --- a/lib/dtas/player.rb +++ b/lib/dtas/player.rb @@ -419,7 +419,6 @@ class DTAS::Player # :nodoc: def player_idle stop_sinks if @sink_buf.inflight == 0 - @tl.reset unless @paused wall("idle") end diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 75e490d..ea0fc28 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -344,7 +344,12 @@ module DTAS::Player::ClientHandler # :nodoc: # no wall, next_source will wall on new track @paused = false return if @current - next_source(_next) + n = _next + unless n + @tl.reset + n = _next + end + next_source(n) end def do_play_pause |