Merge pull request #156 from kingosticks/fix/update-context-uri

Include updating context_uri along with tracks and current index
This commit is contained in:
Sasha Hilton 2018-02-22 16:30:32 +01:00 committed by GitHub
commit 685fb4e345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -667,9 +667,13 @@ impl SpircTask {
fn update_tracks(&mut self, frame: &protocol::spirc::Frame) {
let index = frame.get_state().get_playing_track_index();
let tracks = frame.get_state().get_track();
let context_uri = frame.get_state().get_context_uri().to_owned();
self.state.set_playing_track_index(index);
self.state.set_track(tracks.into_iter().cloned().collect());
self.state.set_context_uri(context_uri);
self.state.set_repeat(frame.get_state().get_repeat());
self.state.set_shuffle(frame.get_state().get_shuffle());
}
fn load_track(&mut self, play: bool) {