diff --git a/src/core/jellyfin.rs b/src/core/jellyfin.rs index 8285003..145ae3d 100644 --- a/src/core/jellyfin.rs +++ b/src/core/jellyfin.rs @@ -165,7 +165,7 @@ impl JellyfinClient { let resp = self .client .post(url) - .header("X-Emby-Authorization", auth_header) + .header("Authorization", auth_header) .json(&body) .send() .map_err(|e| format!("request failed: {e}"))?; @@ -228,7 +228,7 @@ impl JellyfinClient { let resp = self .client .post(url) - .header("X-Emby-Token", &self.token) + .header("Authorization", self.auth_header_value()) .send() .map_err(|e| format!("mark_played request failed: {e}"))?; @@ -246,7 +246,7 @@ impl JellyfinClient { let resp = self .client .delete(url) - .header("X-Emby-Token", &self.token) + .header("Authorization", self.auth_header_value()) .send() .map_err(|e| format!("mark_unplayed request failed: {e}"))?; @@ -273,7 +273,7 @@ impl JellyfinClient { let resp = self .client .post(url) - .header("X-Emby-Token", &self.token) + .header("Authorization", self.auth_header_value()) .json(&body) .send() .map_err(|e| format!("report_playback_start request failed: {e}"))?; @@ -301,7 +301,7 @@ impl JellyfinClient { let resp = self .client .post(url) - .header("X-Emby-Token", &self.token) + .header("Authorization", self.auth_header_value()) .json(&body) .send() .map_err(|e| format!("report_playback_progress request failed: {e}"))?; @@ -327,7 +327,7 @@ impl JellyfinClient { let resp = self .client .post(url) - .header("X-Emby-Token", &self.token) + .header("Authorization", self.auth_header_value()) .json(&body) .send() .map_err(|e| format!("report_playback_stopped request failed: {e}"))?; @@ -345,7 +345,7 @@ impl JellyfinClient { let resp = self .client .get(url) - .header("X-Emby-Authorization", self.auth_header_value()) + .header("Authorization", self.auth_header_value()) .send() .map_err(|e| format!("Views request failed: {e}"))?; @@ -370,7 +370,7 @@ impl JellyfinClient { device_name(), self.device_id, env!("CARGO_PKG_VERSION"), - self.token + self.token, ) } @@ -404,7 +404,7 @@ impl JellyfinClient { let mut req = self .client .get(url) - .header("X-Emby-Authorization", self.auth_header_value()) + .header("Authorization", self.auth_header_value()) .query(&[ ("Recursive", recursive), ("StartIndex", &start_index.to_string()), @@ -481,7 +481,7 @@ pub fn playlist_items( let resp = self .client .get(url) - .header("X-Emby-Authorization", self.auth_header_value()) + .header("Authorization", self.auth_header_value()) .query(&[ ("UserId", user_id), ("StartIndex", &start_index.to_string()),