Handle continuous stream stoppage correctly

When a continuous stream (like radio) stops naturally, do not auto-advance to the next track. Instead, clear the playback source and played flag to ensure proper state management.
This commit is contained in:
2026-02-28 10:47:58 +01:00
parent 9017b70e90
commit eedb0b6a0e

View File

@@ -639,6 +639,14 @@ impl MusicRenderer {
);
self.set_playback_source(PlaybackSource::None);
self.clear_has_played_flag();
} else if self.is_playing_a_stream() {
// Continuous stream (radio) stopped naturally — never auto-advance
debug!(
renderer = self.info.friendly_name(),
"Renderer stopped during continuous stream; not auto-advancing"
);
self.set_playback_source(PlaybackSource::None);
self.clear_has_played_flag();
} else if self.is_playing_from_queue() {
// Only auto-advance if we have actually seen a PLAYING state
// since the track was started. This prevents auto-advance on