Refactor command handling

This commit is contained in:
KoffeinFlummi
2019-03-28 03:05:25 +01:00
parent 83a394790f
commit 486bc7617e
10 changed files with 380 additions and 349 deletions

View File

@@ -91,4 +91,13 @@ impl ListItem for Track {
fn display_right(&self) -> String {
self.duration_str()
}
fn play(&self, queue: Arc<Queue>) {
let index = queue.append_next(vec![self]);
queue.play(index, true);
}
fn queue(&self, queue: Arc<Queue>) {
queue.append(self);
}
}