Skip to content

Commit 80c27ec

Browse files
authored
fix: playback of uris by api request (#1509)
- pop page after usage - become active when play is requested
1 parent b2915ee commit 80c27ec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

connect/src/spirc.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,10 @@ impl SpircTask {
977977
return self.notify().await;
978978
}
979979
Play(mut play) => {
980-
let first_page = play.context.pages.pop();
980+
if !self.connect_state.is_active() {
981+
self.handle_activate()
982+
}
983+
981984
let context = match play.context.uri {
982985
Some(s) => PlayContext::Uri(s),
983986
None if !play.context.pages.is_empty() => PlayContext::Tracks(
@@ -1008,7 +1011,7 @@ impl SpircTask {
10081011
context_options,
10091012
},
10101013
},
1011-
first_page,
1014+
play.context.pages.pop(),
10121015
)
10131016
.await?;
10141017

0 commit comments

Comments
 (0)