From 6c01d94f69235e771d406a647b0d261c4e08b16a Mon Sep 17 00:00:00 2001 From: Erica Z Date: Tue, 5 Nov 2024 10:24:59 +0100 Subject: [PATCH] this is now a warn --- src/ui/window.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ui/window.rs b/src/ui/window.rs index 590ebc4..997c007 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -382,11 +382,16 @@ mod imp { } .unwrap(); - assert_eq!( - duration.map(|f| f as i64), - self.song().as_ref().map(crate::PlaybinSong::duration), - "mpv duration doesn not match subsonic duration (this should probably be a warn)" - ); + { + let left = duration.map(|f| f as i64); + let right = self.song().as_ref().map(crate::PlaybinSong::duration); + if left != right { + event!( + Level::WARN, + "mpv duration {left:?} doesn not match subsonic duration {right:?}" + ); + } + } duration.unwrap_or(0.0) // placeholder }