Move URL handling to relevant structs and share selected song

This commit is contained in:
Rasmus Larsen
2019-05-09 16:04:07 +02:00
parent a145d73072
commit 4897d97931
7 changed files with 58 additions and 10 deletions

View File

@@ -166,4 +166,11 @@ impl ListItem for Playlist {
fn open(&self, queue: Arc<Queue>, library: Arc<Library>) -> Option<Box<dyn ViewExt>> {
Some(PlaylistView::new(queue, library, self).as_boxed_view_ext())
}
fn share_url(&self) -> Option<String> {
Some(format!(
"https://open.spotify.com/user/{}/{}",
self.owner_id, self.id
))
}
}