1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 01:39:28 +02:00

fix: playback of uris by api request (#1509)

- pop page after usage
- become active when play is requested
This commit is contained in:
Felix Prillwitz 2025-06-26 17:39:49 +02:00 committed by GitHub
parent b2915ee2bf
commit 80c27ec476
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -977,7 +977,10 @@ impl SpircTask {
return self.notify().await;
}
Play(mut play) => {
let first_page = play.context.pages.pop();
if !self.connect_state.is_active() {
self.handle_activate()
}
let context = match play.context.uri {
Some(s) => PlayContext::Uri(s),
None if !play.context.pages.is_empty() => PlayContext::Tracks(
@ -1008,7 +1011,7 @@ impl SpircTask {
context_options,
},
},
first_page,
play.context.pages.pop(),
)
.await?;