try fix jukebox
This commit is contained in:
@@ -227,6 +227,9 @@ public class JukeboxManager implements SmartInitializingSingleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
} else {
|
||||||
|
logger.debug("no device, try to start playback!");
|
||||||
|
tryStartPlayback();
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonNull.INSTANCE;
|
return JsonNull.INSTANCE;
|
||||||
@@ -341,8 +344,16 @@ public class JukeboxManager implements SmartInitializingSingleton {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!StringUtils.hasText(config.getDeviceId())) {
|
||||||
|
config.setActive(false);
|
||||||
|
systemPropertyManager.set(ACTIVE, String.valueOf(config.isActive()));
|
||||||
|
logger.debug("discard addToQueue due to missing device id");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MultiValueMap<String, String> queryParameters = new LinkedMultiValueMap<String, String>();
|
MultiValueMap<String, String> queryParameters = new LinkedMultiValueMap<String, String>();
|
||||||
queryParameters.add("uri", uri);
|
queryParameters.add("uri", uri);
|
||||||
|
queryParameters.add("device_id", config.getDeviceId());
|
||||||
WebClient.RequestBodySpec request = webClient.method(HttpMethod.POST)
|
WebClient.RequestBodySpec request = webClient.method(HttpMethod.POST)
|
||||||
.uri(uriBuilder -> uriBuilder.path("/v1/me/player/queue")
|
.uri(uriBuilder -> uriBuilder.path("/v1/me/player/queue")
|
||||||
.queryParams(queryParameters).build())
|
.queryParams(queryParameters).build())
|
||||||
|
|||||||
Reference in New Issue
Block a user