diff --git a/src/playbin.rs b/src/playbin.rs index 4e32b93..8092708 100644 --- a/src/playbin.rs +++ b/src/playbin.rs @@ -123,7 +123,12 @@ impl Playbin { pub fn insert_entry(&self, index: usize, entry: Song) { let mut entries = self.entries.borrow_mut(); self.mpv - .command(["loadfile", &entry.stream_url(), "insert-at-play"]) + .command([ + "loadfile", + &entry.stream_url(), + "insert-at-play", + index.to_string(), + ]) .unwrap(); entries.insert(index, entry);