Implement (un)saving tracks, albums; (un)following artists

This commit is contained in:
KoffeinFlummi
2019-04-18 15:43:51 +02:00
parent 4c974a83f7
commit 1e58ca9345
9 changed files with 241 additions and 17 deletions

View File

@@ -160,4 +160,12 @@ impl ListItem for Album {
}
}
}
fn toggle_saved(&mut self, library: Arc<Library>) {
if library.is_saved_album(self) {
library.unsave_album(self);
} else {
library.save_album(self);
}
}
}