mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Improve log strings and never log to stdout.
This commit is contained in:
parent
f79850f6d6
commit
b828e4d528
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ pub struct AlsaSink(Option<PCM>, String);
|
||||||
|
|
||||||
impl Open for AlsaSink {
|
impl Open for AlsaSink {
|
||||||
fn open(device: Option<&str>) -> AlsaSink {
|
fn open(device: Option<&str>) -> AlsaSink {
|
||||||
println!("Using alsa sink");
|
info!("Using alsa sink");
|
||||||
|
|
||||||
let name = device.unwrap_or("default").to_string();
|
let name = device.unwrap_or("default").to_string();
|
||||||
|
|
||||||
|
|
|
@ -180,12 +180,12 @@ fn find_available_alternative<'a>(session: &Session, track: &'a Track) -> Option
|
||||||
fn load_track(session: &Session, track_id: SpotifyId) -> Option<vorbis::Decoder<Subfile<AudioDecrypt<Box<ReadSeek>>>>> {
|
fn load_track(session: &Session, track_id: SpotifyId) -> Option<vorbis::Decoder<Subfile<AudioDecrypt<Box<ReadSeek>>>>> {
|
||||||
let track = session.metadata::<Track>(track_id).await().unwrap();
|
let track = session.metadata::<Track>(track_id).await().unwrap();
|
||||||
|
|
||||||
info!("Loading track {:?}", track.name);
|
info!("Loading track \"{}\"", track.name);
|
||||||
|
|
||||||
let track = match find_available_alternative(session, &track) {
|
let track = match find_available_alternative(session, &track) {
|
||||||
Some(track) => track,
|
Some(track) => track,
|
||||||
None => {
|
None => {
|
||||||
warn!("Track {:?} is not available", track.name);
|
warn!("Track \"{}\" is not available", track.name);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue