refactor for more generic usage of config path helpers

This commit is contained in:
Henrik Friedrichsen
2019-03-26 19:12:07 +01:00
parent 3892ac07d0
commit 2eea519e82
3 changed files with 8 additions and 6 deletions

View File

@@ -12,6 +12,8 @@ use spotify::Spotify;
use track::Track;
use traits::ListItem;
const CACHE_FILE: &str = "playlists.db";
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Playlist {
pub meta: SimplifiedPlaylist,
@@ -54,7 +56,7 @@ impl Playlists {
store: Arc::new(RwLock::new(Vec::new())),
ev: ev.clone(),
spotify: spotify.clone(),
cache_path: config::cache_path(),
cache_path: config::cache_path(CACHE_FILE),
}
}