1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-06 03:50:06 +02:00

Merge branch 'dev' into tokio_migration

This commit is contained in:
johannesd3 2021-02-10 21:51:33 +01:00
commit 872fab62d8
23 changed files with 884 additions and 562 deletions

View file

@ -312,8 +312,8 @@ impl AudioFile {
let session_ = session.clone();
session.spawn(complete_rx.map_ok(move |mut file| {
if let Some(cache) = session_.cache() {
cache.save_file(file_id, &mut file);
debug!("File {} complete, saving to cache", file_id);
cache.save_file(file_id, &mut file);
} else {
debug!("File {} complete", file_id);
}
@ -336,6 +336,13 @@ impl AudioFile {
},
}
}
pub fn is_cached(&self) -> bool {
match self {
AudioFile::Cached { .. } => true,
_ => false,
}
}
}
impl AudioFileStreaming {

View file

@ -73,10 +73,6 @@ impl fmt::Display for VorbisError {
}
impl error::Error for VorbisError {
fn description(&self) -> &str {
error::Error::description(&self.0)
}
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
error::Error::source(&self.0)
}