mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
commit
51284d36e3
2 changed files with 2 additions and 3 deletions
|
@ -1382,7 +1382,6 @@ impl SpircTask {
|
||||||
// has_shuffle/repeat seem to always be true in these replace msgs,
|
// has_shuffle/repeat seem to always be true in these replace msgs,
|
||||||
// but to replicate the behaviour of the Android client we have to
|
// but to replicate the behaviour of the Android client we have to
|
||||||
// ignore false values.
|
// ignore false values.
|
||||||
let state = state;
|
|
||||||
if state.repeat() {
|
if state.repeat() {
|
||||||
self.state.set_repeat(true);
|
self.state.set_repeat(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,7 +392,7 @@ impl SpClient {
|
||||||
) -> SpClientResult {
|
) -> SpClientResult {
|
||||||
let body = protobuf::text_format::print_to_string(message);
|
let body = protobuf::text_format::print_to_string(message);
|
||||||
|
|
||||||
let mut headers = headers.unwrap_or_else(HeaderMap::new);
|
let mut headers = headers.unwrap_or_default();
|
||||||
headers.insert(
|
headers.insert(
|
||||||
CONTENT_TYPE,
|
CONTENT_TYPE,
|
||||||
HeaderValue::from_static("application/x-protobuf"),
|
HeaderValue::from_static("application/x-protobuf"),
|
||||||
|
@ -409,7 +409,7 @@ impl SpClient {
|
||||||
headers: Option<HeaderMap>,
|
headers: Option<HeaderMap>,
|
||||||
body: Option<&str>,
|
body: Option<&str>,
|
||||||
) -> SpClientResult {
|
) -> SpClientResult {
|
||||||
let mut headers = headers.unwrap_or_else(HeaderMap::new);
|
let mut headers = headers.unwrap_or_default();
|
||||||
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
|
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
|
||||||
|
|
||||||
self.request(method, endpoint, Some(headers), body).await
|
self.request(method, endpoint, Some(headers), body).await
|
||||||
|
|
Loading…
Reference in a new issue