From: Marcel van der Veldt Date: Sat, 25 Oct 2025 19:35:50 +0000 (+0200) Subject: Fix small oversight in audio buffer X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=f39a18af67ec945130cea90d9dc0baf5a368d43e;p=music-assistant-server.git Fix small oversight in audio buffer --- 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