mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 09:49:31 +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:
parent
b2915ee2bf
commit
80c27ec476
1 changed files with 5 additions and 2 deletions
|
@ -977,7 +977,10 @@ impl SpircTask {
|
||||||
return self.notify().await;
|
return self.notify().await;
|
||||||
}
|
}
|
||||||
Play(mut play) => {
|
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 {
|
let context = match play.context.uri {
|
||||||
Some(s) => PlayContext::Uri(s),
|
Some(s) => PlayContext::Uri(s),
|
||||||
None if !play.context.pages.is_empty() => PlayContext::Tracks(
|
None if !play.context.pages.is_empty() => PlayContext::Tracks(
|
||||||
|
@ -1008,7 +1011,7 @@ impl SpircTask {
|
||||||
context_options,
|
context_options,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
first_page,
|
play.context.pages.pop(),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue