1
0
Fork 0
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:
johannesd3 2021-01-25 02:22:25 +01:00
parent 14a004f84c
commit fa5c9f7d11
3 changed files with 108 additions and 117 deletions

View file

@ -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);
}