mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-04 10:19:27 +02:00
Made locations in cache optional
The locations of credentials, volume and audio are now stored in three separate Optional<PathBuf>s. Removed the clearing of the cache if an error occurs. This might be added again later.
This commit is contained in:
parent
14a004f84c
commit
fa5c9f7d11
3 changed files with 108 additions and 117 deletions
|
@ -430,9 +430,7 @@ impl AudioFile {
|
|||
.map(move |mut file| {
|
||||
if let Some(cache) = session_.cache() {
|
||||
debug!("File {} complete, saving to cache", file_id);
|
||||
if let Err(err) = cache.save_file(file_id, &mut file) {
|
||||
warn!("Cannot save file to cache: {}", err);
|
||||
}
|
||||
cache.save_file(file_id, &mut file);
|
||||
} else {
|
||||
debug!("File {} complete", file_id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue