From e0c5faa037472f1396d9b29cf8f37ffba1eebca1 Mon Sep 17 00:00:00 2001 From: kwarklabs <96121168+kwarklabs@users.noreply.github.com> Date: Fri, 6 May 2022 16:00:01 +0100 Subject: [PATCH] Update StreamingController.pm --- Slim/Player/StreamingController.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Slim/Player/StreamingController.pm b/Slim/Player/StreamingController.pm index eba340a8d5e..a326dff878e 100644 --- a/Slim/Player/StreamingController.pm +++ b/Slim/Player/StreamingController.pm @@ -924,7 +924,7 @@ sub _RetryOrNext { # -> Idle; IF [shouldretry && canretry] THEN continue } else { $log->debug("Elapsed: " . $elapsed); $log->debug("Duration: " . $song->duration()); - if (!$elapsed || !$song->duration() || $song->duration() < $elapsed || $song->duration() - $elapsed < 10) # check we have more than 10 seconds left to play. + if (!$elapsed || !$song->duration() || !($elapsed < $song->duration()) || $song->duration() - $elapsed < 10) # check we have more than 10 seconds left to play. { if ( main::DEBUGLOG && $log->is_debug ) {$log->debug("Will not retry - no player sync or track is within 10 seconds of end.")}; } else { @@ -1431,7 +1431,7 @@ sub _willRetry { $log->debug("Elapsed: " . $elapsed); $log->debug("Duration: " . $song->duration()); if ($song->retryData->{'count'} > scalar @retryIntervals || !$elapsed || $elapsed < 10 || - !$song->duration() || $song->duration() < $elapsed || ($song->duration() - $elapsed < 10)) { + !$song->duration() || !($elapsed < $song->duration()) || ($song->duration() - $elapsed < 10)) { if ( main::DEBUGLOG && $log->is_debug ) {$log->debug("Will not retry - no player sync, too many retries or track within 10 seconds of start or end.")}; return 0; }