connect: always handle player seek event

This commit is contained in:
Felix Prillwitz 2024-12-12 17:52:19 +01:00
parent b13ab3aa1b
commit 932c6fa25f
No known key found for this signature in database
GPG key ID: DE334B43606D1455

View file

@ -607,9 +607,13 @@ impl SpircTask {
trace!("==> Loading"); trace!("==> Loading");
} }
}, },
PlayerEvent::Seeked { position_ms, .. } => {
trace!("==> Seeked");
self.connect_state
.update_position(position_ms, self.now_ms())
}
PlayerEvent::Playing { position_ms, .. } PlayerEvent::Playing { position_ms, .. }
| PlayerEvent::PositionCorrection { position_ms, .. } | PlayerEvent::PositionCorrection { position_ms, .. } => {
| PlayerEvent::Seeked { position_ms, .. } => {
trace!("==> Playing"); trace!("==> Playing");
let new_nominal_start_time = self.now_ms() - position_ms as i64; let new_nominal_start_time = self.now_ms() - position_ms as i64;
match self.play_status { match self.play_status {