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 {