Cange the StatusChanged to accsept a track instance

This commit is contained in:
Anas Elgarhy 2023-02-17 05:59:45 +02:00
parent d81eeb8baf
commit e7b9bfba9e
No known key found for this signature in database
GPG Key ID: 0501802A1D496528
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ use crate::cmus::{Track, TrackStatus};
#[derive(Debug)]
pub enum CmusEvent {
StatusChanged(TrackStatus),
StatusChanged(TrackStatus, Track),
TrackChanged(Track),
VolumeChanged { left: u8, right: u8 },
PositionChanged(u32),

View File

@ -73,7 +73,7 @@ impl CmusQueryResponse {
"Status changed: {:?} -> {:?}",
other_track.status, track.status
);
events.push(CmusEvent::StatusChanged(other_track.status));
events.push(CmusEvent::StatusChanged(other_track.status, track));
} else if track.position != other_track.position {
#[cfg(feature = "debug")]
debug!(