From 129281ea4a7fd6e3f2da8aaefe1703d840c81ace Mon Sep 17 00:00:00 2001 From: Erica Z Date: Sun, 10 Nov 2024 15:57:03 +0100 Subject: [PATCH] another sanity check --- src/ui/window.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/window.rs b/src/ui/window.rs index 5a75107..83c5b56 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -368,7 +368,9 @@ mod imp { } fn playlist_count(&self) -> i64 { - self.mpv.get_property::("playlist-count").unwrap() + let count = self.mpv.get_property::("playlist-count").unwrap(); + assert_eq!(count as u32, self.playlist_model.n_items()); + count } fn song(&self) -> Option {