mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Compare commits
2 commits
d073cb1997
...
b6931e3de5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b6931e3de5 | ||
![]() |
1a19d94063 |
3 changed files with 11 additions and 3 deletions
|
@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
- [core] Fixed a problem where in `spclient` where a http 411 error was thrown because the header were set wrong
|
||||
|
||||
### Security
|
||||
|
||||
## [0.7.0] - 2025-08-24
|
||||
|
|
|
@ -489,9 +489,12 @@ impl SpClient {
|
|||
let token = self.session().login5().auth_token().await?;
|
||||
|
||||
let headers_mut = request.headers_mut();
|
||||
if let Some(ref hdrs) = headers {
|
||||
*headers_mut = hdrs.clone();
|
||||
if let Some(ref headers) = headers {
|
||||
for (name, value) in headers {
|
||||
headers_mut.insert(name, value.clone());
|
||||
}
|
||||
}
|
||||
|
||||
headers_mut.insert(
|
||||
AUTHORIZATION,
|
||||
HeaderValue::from_str(&format!("{} {}", token.token_type, token.access_token,))?,
|
||||
|
|
|
@ -193,7 +193,7 @@ fn create_sink(
|
|||
AudioFormat::S16 => cpal::SampleFormat::I16,
|
||||
};
|
||||
|
||||
let stream = match rodio::OutputStreamBuilder::default()
|
||||
let mut stream = match rodio::OutputStreamBuilder::default()
|
||||
.with_device(cpal_device.clone())
|
||||
.with_config(&config.config())
|
||||
.with_sample_format(sample_format)
|
||||
|
@ -206,6 +206,9 @@ fn create_sink(
|
|||
}
|
||||
};
|
||||
|
||||
// disable logging on stream drop
|
||||
stream.log_on_drop(false);
|
||||
|
||||
let sink = rodio::Sink::connect_new(stream.mixer());
|
||||
Ok((sink, stream))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue