From: Marcel van der Veldt Date: Wed, 27 Jul 2022 18:00:12 +0000 (+0200) Subject: cleanup X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=1b47bde7dd45437305ab7a19e0eeb6bd33d64632;p=music-assistant-server.git cleanup --- diff --git a/music_assistant/controllers/streams.py b/music_assistant/controllers/streams.py index 26769f3d..428d4600 100644 --- a/music_assistant/controllers/streams.py +++ b/music_assistant/controllers/streams.py @@ -637,23 +637,11 @@ class QueueStream: ) # use dynamic buffer size to account for slow connections (or throttling providers, like YT) # buffer_duration has some overhead to account for padded silence - if streamdetails.provider == ProviderType.YTMUSIC: - buffer_duration = min(crossfade_duration, 8) - elif use_crossfade and buffered_ahead > (crossfade_duration * 4): - buffer_duration = crossfade_duration + 6 - elif use_crossfade and buffered_ahead > (crossfade_duration * 2): - buffer_duration = crossfade_duration + 4 - else: - buffer_duration = 2 - - # use dynamic buffer size to account for slow connections (or throttling providers, like YT) - # buffer_duration has some overhead to account for padded silence + padding = 0 if streamdetails.provider == ProviderType.YTMUSIC else 5 if use_crossfade and buffered_ahead > (crossfade_duration * 4): - buffer_duration = crossfade_duration + 6 - elif use_crossfade and buffered_ahead > (crossfade_duration * 2): - buffer_duration = crossfade_duration + 4 + buffer_duration = crossfade_duration + padding else: - buffer_duration = 2 + buffer_duration = 1 #### HANDLE FIRST PART OF TRACK