mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Send Changed event after song change even if we stop playback.
This commit is contained in:
parent
0a6825ba61
commit
3e2e6d63f7
1 changed files with 9 additions and 0 deletions
|
@ -346,6 +346,15 @@ impl PlayerInternal {
|
||||||
decoder: decoder,
|
decoder: decoder,
|
||||||
end_of_track: end_of_track,
|
end_of_track: end_of_track,
|
||||||
};
|
};
|
||||||
|
match self.state {
|
||||||
|
PlayerState::Playing { track_id: old_track_id, ..}
|
||||||
|
| PlayerState::EndOfTrack { track_id: old_track_id, .. } =>
|
||||||
|
self.send_event(PlayerEvent::Changed {
|
||||||
|
old_track_id: old_track_id,
|
||||||
|
new_track_id: track_id
|
||||||
|
}),
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
self.send_event(PlayerEvent::Stopped { track_id });
|
self.send_event(PlayerEvent::Stopped { track_id });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue