connect: handle_player_event update log entries

This commit is contained in:
Felix Prillwitz 2024-12-10 18:05:04 +01:00
parent e0f11f12c9
commit c8131beebb
No known key found for this signature in database
GPG key ID: DE334B43606D1455

View file

@ -690,22 +690,22 @@ impl SpircTask {
SpircPlayStatus::LoadingPlay { position_ms } => { SpircPlayStatus::LoadingPlay { position_ms } => {
self.connect_state self.connect_state
.update_position(position_ms, self.now_ms()); .update_position(position_ms, self.now_ms());
trace!("==> kPlayStatusPlay"); trace!("==> LoadingPlay");
} }
SpircPlayStatus::LoadingPause { position_ms } => { SpircPlayStatus::LoadingPause { position_ms } => {
self.connect_state self.connect_state
.update_position(position_ms, self.now_ms()); .update_position(position_ms, self.now_ms());
trace!("==> kPlayStatusPause"); trace!("==> LoadingPause");
} }
_ => { _ => {
self.connect_state.update_position(0, self.now_ms()); self.connect_state.update_position(0, self.now_ms());
trace!("==> kPlayStatusLoading"); trace!("==> Loading");
} }
}, },
PlayerEvent::Playing { position_ms, .. } PlayerEvent::Playing { position_ms, .. }
| PlayerEvent::PositionCorrection { position_ms, .. } | PlayerEvent::PositionCorrection { position_ms, .. }
| PlayerEvent::Seeked { position_ms, .. } => { | PlayerEvent::Seeked { position_ms, .. } => {
trace!("==> kPlayStatusPlay"); 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 {
SpircPlayStatus::Playing { SpircPlayStatus::Playing {
@ -735,7 +735,7 @@ impl SpircTask {
position_ms: new_position_ms, position_ms: new_position_ms,
.. ..
} => { } => {
trace!("==> kPlayStatusPause"); trace!("==> Paused");
match self.play_status { match self.play_status {
SpircPlayStatus::Paused { .. } | SpircPlayStatus::Playing { .. } => { SpircPlayStatus::Paused { .. } | SpircPlayStatus::Playing { .. } => {
self.connect_state self.connect_state
@ -757,7 +757,7 @@ impl SpircTask {
} }
} }
PlayerEvent::Stopped { .. } => { PlayerEvent::Stopped { .. } => {
trace!("==> kPlayStatusStop"); trace!("==> Stopped");
match self.play_status { match self.play_status {
SpircPlayStatus::Stopped => return Ok(()), SpircPlayStatus::Stopped => return Ok(()),
_ => self.play_status = SpircPlayStatus::Stopped, _ => self.play_status = SpircPlayStatus::Stopped,