Skip to content

Commit 6ee2657

Browse files
committed
Fix Spotify CDN issues on playback (#2317)
Fix spotify CDN issues on playback
1 parent d4df876 commit 6ee2657

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

music_assistant/providers/spotify/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,16 +598,17 @@ async def get_audio_stream(
598598

599599
# we retry twice in case librespot fails to start
600600
for attempt in (1, 2):
601+
log_librespot = self.logger.isEnabledFor(VERBOSE_LOG_LEVEL) or attempt == 2
601602
async with AsyncProcess(
602603
args,
603604
stdout=True,
604-
stderr=None if self.logger.isEnabledFor(VERBOSE_LOG_LEVEL) else False,
605+
stderr=None if log_librespot else False,
605606
name="librespot",
606607
) as librespot_proc:
607608
# get first chunk with timeout, to catch the issue where librespot is not starting
608609
# which seems to happen from time to time (but rarely)
609610
try:
610-
chunk = await asyncio.wait_for(librespot_proc.read(64000), timeout=5 * attempt)
611+
chunk = await asyncio.wait_for(librespot_proc.read(64000), timeout=10 * attempt)
611612
if not chunk:
612613
raise AudioError
613614
yield chunk
238 KB
Binary file not shown.

0 commit comments

Comments
 (0)