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:
parent
b2915ee2bf
commit
80c27ec476
1 changed files with 5 additions and 2 deletions
|
@ -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?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue