diff --git a/Cargo.lock b/Cargo.lock index 647cacf8..0175f9b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,10 +1,3 @@ -[root] -name = "librespot-protocol" -version = "0.1.0" -dependencies = [ - "protobuf 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "aho-corasick" version = "0.6.4" @@ -506,6 +499,13 @@ dependencies = [ "portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "librespot-protocol" +version = "0.1.0" +dependencies = [ + "protobuf 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "linear-map" version = "1.2.0" diff --git a/core/src/mercury/mod.rs b/core/src/mercury/mod.rs index 80b45ec5..0b69d8ee 100644 --- a/core/src/mercury/mod.rs +++ b/core/src/mercury/mod.rs @@ -189,7 +189,9 @@ impl MercuryManager { payload: pending.parts, }; - if response.status_code >= 400 { + if response.status_code >= 500 { + panic!("Spotify servers returned an error. Restart librespot."); + } else if response.status_code >= 400 { warn!("error {} for uri {}", response.status_code, &response.uri); if let Some(cb) = pending.callback { let _ = cb.send(Err(MercuryError));