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:
commit
872fab62d8
23 changed files with 884 additions and 562 deletions
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue