Add audio_cache_size to set maximum cache size
This commit is contained in:
@@ -162,7 +162,9 @@ impl Spotify {
|
||||
let cache = Cache::new(
|
||||
Some(config::cache_path("librespot")),
|
||||
audio_cache_path,
|
||||
None,
|
||||
cfg.values()
|
||||
.audio_cache_size
|
||||
.map(|size| (size * 1048576) as u64),
|
||||
)
|
||||
.expect("Could not create cache");
|
||||
debug!("opening spotify session");
|
||||
|
||||
Reference in New Issue
Block a user