From f39a18af67ec945130cea90d9dc0baf5a368d43e Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sat, 25 Oct 2025 21:35:50 +0200 Subject: [PATCH] Fix small oversight in audio buffer --- music_assistant/helpers/audio_buffer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/music_assistant/helpers/audio_buffer.py b/music_assistant/helpers/audio_buffer.py index 735a828b..7f7403b5 100644 --- a/music_assistant/helpers/audio_buffer.py +++ b/music_assistant/helpers/audio_buffer.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: LOGGER = logging.getLogger(f"{MASS_LOGGER_NAME}.audio_buffer") -DEFAULT_MAX_BUFFER_SIZE_SECONDS: int = 60 * 5 # 5 minutes +DEFAULT_MAX_BUFFER_SIZE_SECONDS: int = 60 * 8 # 8 minutes class AudioBuffer: @@ -107,6 +107,9 @@ class AudioBuffer: # Buffer is close to being cleared, don't reuse it return False + if seek_position > self._discarded_chunks + self.max_size_seconds: + return False + # Check if the seek position has already been discarded return seek_position >= self._discarded_chunks -- 2.34.1