Skip to content

Commit 2e41807

Browse files
committed
Do not panic when trying to load autoplay for search context
1 parent 3cb9681 commit 2e41807

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • core/src/main/java/xyz/gianlu/librespot/player

core/src/main/java/xyz/gianlu/librespot/player/Player.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,15 @@ private void loadAutoplay() {
458458
return;
459459
}
460460

461+
if (context.startsWith("spotify:search:")) {
462+
LOGGER.info("Cannot load autoplay for search context: " + context);
463+
464+
state.setPosition(0);
465+
state.setState(true, false, false);
466+
state.updated();
467+
return;
468+
}
469+
461470
String contextDesc = state.getContextMetadata("context_description");
462471

463472
try {

0 commit comments

Comments
 (0)