make album column for tracks configurable

introduces new config variable `album_column`

fixes #267
This commit is contained in:
Henrik Friedrichsen
2020-10-17 23:56:23 +02:00
parent 9fbbc7921e
commit e1b4892b8a
12 changed files with 22 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ use serde::Serialize;
use crate::album::Album;
use crate::artist::Artist;
use crate::config;
use crate::config::Config;
use crate::events::EventManager;
use crate::playable::Playable;
use crate::playlist::Playlist;
@@ -65,6 +66,10 @@ impl Library {
.expect("could not readlock listview content")
}
pub fn config(&self) -> &Config {
&self.spotify.cfg
}
fn load_cache<T: DeserializeOwned>(&self, cache_path: PathBuf, store: Arc<RwLock<Vec<T>>>) {
if let Ok(contents) = std::fs::read_to_string(&cache_path) {
debug!("loading cache from {}", cache_path.display());