From e9b8c1e82fcbf7f854f7f0f4abfbc05ad771c524 Mon Sep 17 00:00:00 2001 From: Mikael Larsson Date: Sun, 19 Dec 2021 21:19:42 +0100 Subject: [PATCH] Reset song queue on player stopped and queue finished --- Slim/Player/StreamingController.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Slim/Player/StreamingController.pm b/Slim/Player/StreamingController.pm index 005f81f9754..e9f4459f545 100644 --- a/Slim/Player/StreamingController.pm +++ b/Slim/Player/StreamingController.pm @@ -2230,6 +2230,13 @@ sub playerStopped { } } + # If queue finished playing then reset song queue + my $currsong = Slim::Player::Source::playingSongIndex($client) + 1; + my $count = Slim::Player::Playlist::count($client); + if ($currsong == $count) { + $self->resetSongqueue(0); + } + _eventAction($self, 'Stopped'); }