diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-26 08:53:39 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-26 08:53:39 +0000 |
commit | fba04b17d7f256e5e83e61673d69a88c2748e9ac (patch) | |
tree | 29864dcc3df290da65655470a94919d461e41f28 /lib/dtas/player | |
parent | aecc68d704e251775732da23eea1cfa301316d65 (diff) | |
download | dtas-fba04b17d7f256e5e83e61673d69a88c2748e9ac.tar.gz |
@current is only set if is active with a pid, now, so all of our checks for @current.pid are redundant and confusing.
Diffstat (limited to 'lib/dtas/player')
-rw-r--r-- | lib/dtas/player/client_handler.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 40825a0..c346973 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -199,7 +199,7 @@ module DTAS::Player::ClientHandler # :nodoc: end def __current_requeue - return unless @current && @current.pid + return unless @current # no need to requeue if we're already due to die return if @current.requeued @@ -341,7 +341,7 @@ module DTAS::Player::ClientHandler # :nodoc: def do_play # no echo, next_source will echo on new track @paused = false - return if @current && @current.pid + return if @current next_source(@queue.shift) end @@ -350,7 +350,7 @@ module DTAS::Player::ClientHandler # :nodoc: end def do_seek(io, offset) - if @current && @current.pid + if @current if @current.respond_to?(:infile) begin if offset.sub!(/\A\+/, '') |