From f3a309c5971af1fb7ea46944a39f18e37500aacc Mon Sep 17 00:00:00 2001 From: _Bastler Date: Fri, 21 Jan 2022 15:20:51 +0100 Subject: [PATCH] jukebox fix --- .../de/bstly/we/jukebox/businesslogic/JukeboxManager.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jukebox/src/main/java/de/bstly/we/jukebox/businesslogic/JukeboxManager.java b/jukebox/src/main/java/de/bstly/we/jukebox/businesslogic/JukeboxManager.java index 61547d7..3c1e1a5 100644 --- a/jukebox/src/main/java/de/bstly/we/jukebox/businesslogic/JukeboxManager.java +++ b/jukebox/src/main/java/de/bstly/we/jukebox/businesslogic/JukeboxManager.java @@ -222,6 +222,10 @@ public class JukeboxManager implements SmartInitializingSingleton { request.retrieve().bodyToMono(String.class).block(); return getStatus(); } + if (!statusObject.get("is_playing").getAsBoolean()) { + logger.debug("no playing, try to start playback!"); + tryStartPlayback(); + } } } if (disable) { @@ -230,9 +234,6 @@ public class JukeboxManager implements SmartInitializingSingleton { } } return status; - } else { - logger.debug("no device, try to start playback!"); - tryStartPlayback(config.getFallbackContextId()); } return JsonNull.INSTANCE;