playlist remove
This commit is contained in:
parent
40612729a1
commit
f2f6c67383
2 changed files with 9 additions and 4 deletions
|
@ -60,13 +60,10 @@ mod imp {
|
|||
#[weak(rename_to = self_)]
|
||||
self,
|
||||
move |_, _, _| {
|
||||
/*
|
||||
self_
|
||||
.obj()
|
||||
.window()
|
||||
.playbin()
|
||||
.remove_entry(self_.obj().displayed_position() as usize - 1)*/
|
||||
todo!()
|
||||
.playlist_remove(self_.obj().position() as i64)
|
||||
}
|
||||
))
|
||||
.build();
|
||||
|
|
|
@ -396,4 +396,12 @@ impl Window {
|
|||
.command(["playlist-play-index", &index.to_string()])
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
pub fn playlist_remove(&self, index: i64) {
|
||||
self.imp()
|
||||
.mpv
|
||||
.command(["playlist-remove", &index.to_string()])
|
||||
.unwrap();
|
||||
self.playlist_model().remove(index as u32);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue