From 4275a071b1b736d6ee682d28fd7f2c3dc56d7feb Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Sun, 1 Sep 2024 07:08:30 +0200 Subject: [PATCH] api: be more relaxed with status codes --- crates/oxidize-api/src/spotify.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxidize-api/src/spotify.rs b/crates/oxidize-api/src/spotify.rs index c59178c7..3c74118f 100644 --- a/crates/oxidize-api/src/spotify.rs +++ b/crates/oxidize-api/src/spotify.rs @@ -279,11 +279,11 @@ impl Spotify { } } -/// Handle device control requests. +/// Handle device control responses. fn device_control(status: StatusCode, _: &C) -> Result> { match status { - StatusCode::NO_CONTENT => Ok(Some(true)), StatusCode::NOT_FOUND => Ok(Some(false)), + status if status.is_success() => Ok(Some(true)), _ => Ok(None), } }