move sanity check
This commit is contained in:
parent
f18c413457
commit
daff4e7dbd
1 changed files with 14 additions and 14 deletions
|
@ -150,12 +150,6 @@ mod imp {
|
|||
Event::StartFile(_) => {
|
||||
window.notify("song");
|
||||
// TODO: load cover art
|
||||
|
||||
// sanity check
|
||||
assert_eq!(
|
||||
window.song().unwrap().stream_url(),
|
||||
window.imp().mpv.get_property::<String>("path").unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
Event::Hook(event) => match event.reply_userdata {
|
||||
|
@ -332,14 +326,20 @@ mod imp {
|
|||
if self.obj().playlist_pos() < 0 {
|
||||
None
|
||||
} else {
|
||||
Some(
|
||||
self.obj()
|
||||
let song: PlaybinSong = self
|
||||
.obj()
|
||||
.playlist_model()
|
||||
.item(self.obj().playlist_pos() as u32)
|
||||
.unwrap()
|
||||
.dynamic_cast()
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// sanity check
|
||||
assert_eq!(
|
||||
song.stream_url(),
|
||||
self.mpv.get_property::<String>("path").unwrap()
|
||||
);
|
||||
Some(song)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue