implement playlist caching

This commit is contained in:
Henrik Friedrichsen
2019-03-14 20:34:13 +01:00
parent 8dbfbf104f
commit a5d00730ea
7 changed files with 339 additions and 177 deletions

View File

@@ -2,7 +2,7 @@ use std::fmt;
use rspotify::spotify::model::track::FullTrack;
#[derive(Clone)]
#[derive(Clone, Deserialize, Serialize)]
pub struct Track {
pub id: String,
pub title: String,
@@ -24,7 +24,8 @@ impl Track {
.map(|ref artist| artist.name.clone())
.collect::<Vec<String>>();
let album_artists = track
.album.artists
.album
.artists
.iter()
.map(|ref artist| artist.name.clone())
.collect::<Vec<String>>();