Show tracks + duration of album, playlist, queue

Stats are in the top right

Fixes #475
This commit is contained in:
Henrik Friedrichsen
2021-04-08 22:13:07 +02:00
parent 577e7ebd87
commit 32cb6e70d3
7 changed files with 83 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ pub trait ViewExt: View {
"".into()
}
fn title_sub(&self) -> String {
"".into()
}
fn on_leave(&self) {}
fn on_command(&mut self, _s: &mut Cursive, _cmd: &Command) -> Result<CommandResult, String> {
@@ -67,6 +71,10 @@ impl<V: ViewExt> ViewExt for NamedView<V> {
self.with_view(|v| v.title()).unwrap_or_default()
}
fn title_sub(&self) -> String {
self.with_view(|v| v.title_sub()).unwrap_or_default()
}
fn on_leave(&self) {
self.with_view(|v| v.on_leave());
}