Index: Slim/Player/StreamingController.pm =================================================================== --- Slim/Player/StreamingController.pm (revision 24365) +++ Slim/Player/StreamingController.pm (working copy) @@ -1020,7 +1020,7 @@ my ($self, $event, $params) = @_; my $song = $self->{'nextTrack'}; - if (!$song) {return;} + if (!$song) {$log->info('no song');return;} # Bug 5103, the firmware can handle only 2 tracks at a time: one playing and one streaming, # and on very short tracks we may get multiple decoder underrun events during playback of a single @@ -1026,7 +1026,7 @@ # and on very short tracks we may get multiple decoder underrun events during playback of a single # track. We need to ignore decoder underrun events if there's already a streaming track in the queue if (scalar @{$self->{'songqueue'}} > 1) { - return; + $log->info('queue full');return; } my $ready = 1; @@ -1033,7 +1033,7 @@ foreach my $player (@{$self->{'players'}}) { if (!$player->isReadyToStream($song)) { $ready = 0; - last; + $log->info('not ready');last; } } @@ -1668,6 +1668,12 @@ $log->info($client->id); streamingSong($self)->{'status'} = Slim::Player::Song::STATUS_FAILED; + + # bug 10407: remove failed Song from song-queue unless only Song in queue. + my $queue = $self->{'songqueue'}; + if (scalar(@$queue) > 1) { + shift @$queue; + } _errorOpening($self, streamingSong($self)->currentTrack()->url, @error); Index: Slim/Player/Squeezebox2.pm =================================================================== --- Slim/Player/Squeezebox2.pm (revision 24365) +++ Slim/Player/Squeezebox2.pm (working copy) @@ -386,7 +386,7 @@ return undef; } - + sub directHeaders { my $client = shift; my $headers = shift; @@ -435,6 +435,7 @@ my $status_line = $response; $response = $1; + if (($response < 200) || $response > 399) { @@ -441,7 +442,10 @@ $directlog->warn("Invalid response code ($response) from remote stream $url"); if ($songHandler && $songHandler->can("handleDirectError")) { - + + # bug 10407 - make sure ready to stream again + $client->readyToStream(1); + $songHandler->handleDirectError($client, $url, $response, $status_line); } else { @@ -724,6 +728,9 @@ sub failedDirectStream { my $client = shift; my $error = shift; + + # bug 10407 - make sure ready to stream again + $client->readyToStream(1); my $controller = $client->controller()->songStreamController();; Index: Slim/Networking/Slimproto.pm =================================================================== --- Slim/Networking/Slimproto.pm (revision 24365) +++ Slim/Networking/Slimproto.pm (working copy) @@ -592,6 +592,10 @@ if ($controller && $controller->isDirect() ) { my $handler = $controller->protocolHandler(); if ($handler->can("handleDirectError") ) { + + # bug 10407 - make sure ready to stream again + $client->readyToStream(1); + $handler->handleDirectError( $client, $controller->streamUrl(), $reason, $reasons{$reason} ); return; }