12.0 support
This commit is contained in:
+10
-10
@@ -165,7 +165,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.post(url)
|
.post(url)
|
||||||
.header("X-Emby-Authorization", auth_header)
|
.header("Authorization", auth_header)
|
||||||
.json(&body)
|
.json(&body)
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("request failed: {e}"))?;
|
.map_err(|e| format!("request failed: {e}"))?;
|
||||||
@@ -228,7 +228,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.post(url)
|
.post(url)
|
||||||
.header("X-Emby-Token", &self.token)
|
.header("Authorization", self.auth_header_value())
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("mark_played request failed: {e}"))?;
|
.map_err(|e| format!("mark_played request failed: {e}"))?;
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.delete(url)
|
.delete(url)
|
||||||
.header("X-Emby-Token", &self.token)
|
.header("Authorization", self.auth_header_value())
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("mark_unplayed request failed: {e}"))?;
|
.map_err(|e| format!("mark_unplayed request failed: {e}"))?;
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.post(url)
|
.post(url)
|
||||||
.header("X-Emby-Token", &self.token)
|
.header("Authorization", self.auth_header_value())
|
||||||
.json(&body)
|
.json(&body)
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("report_playback_start request failed: {e}"))?;
|
.map_err(|e| format!("report_playback_start request failed: {e}"))?;
|
||||||
@@ -301,7 +301,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.post(url)
|
.post(url)
|
||||||
.header("X-Emby-Token", &self.token)
|
.header("Authorization", self.auth_header_value())
|
||||||
.json(&body)
|
.json(&body)
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("report_playback_progress request failed: {e}"))?;
|
.map_err(|e| format!("report_playback_progress request failed: {e}"))?;
|
||||||
@@ -327,7 +327,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.post(url)
|
.post(url)
|
||||||
.header("X-Emby-Token", &self.token)
|
.header("Authorization", self.auth_header_value())
|
||||||
.json(&body)
|
.json(&body)
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("report_playback_stopped request failed: {e}"))?;
|
.map_err(|e| format!("report_playback_stopped request failed: {e}"))?;
|
||||||
@@ -345,7 +345,7 @@ impl JellyfinClient {
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.get(url)
|
.get(url)
|
||||||
.header("X-Emby-Authorization", self.auth_header_value())
|
.header("Authorization", self.auth_header_value())
|
||||||
.send()
|
.send()
|
||||||
.map_err(|e| format!("Views request failed: {e}"))?;
|
.map_err(|e| format!("Views request failed: {e}"))?;
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ impl JellyfinClient {
|
|||||||
device_name(),
|
device_name(),
|
||||||
self.device_id,
|
self.device_id,
|
||||||
env!("CARGO_PKG_VERSION"),
|
env!("CARGO_PKG_VERSION"),
|
||||||
self.token
|
self.token,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ impl JellyfinClient {
|
|||||||
let mut req = self
|
let mut req = self
|
||||||
.client
|
.client
|
||||||
.get(url)
|
.get(url)
|
||||||
.header("X-Emby-Authorization", self.auth_header_value())
|
.header("Authorization", self.auth_header_value())
|
||||||
.query(&[
|
.query(&[
|
||||||
("Recursive", recursive),
|
("Recursive", recursive),
|
||||||
("StartIndex", &start_index.to_string()),
|
("StartIndex", &start_index.to_string()),
|
||||||
@@ -481,7 +481,7 @@ pub fn playlist_items(
|
|||||||
let resp = self
|
let resp = self
|
||||||
.client
|
.client
|
||||||
.get(url)
|
.get(url)
|
||||||
.header("X-Emby-Authorization", self.auth_header_value())
|
.header("Authorization", self.auth_header_value())
|
||||||
.query(&[
|
.query(&[
|
||||||
("UserId", user_id),
|
("UserId", user_id),
|
||||||
("StartIndex", &start_index.to_string()),
|
("StartIndex", &start_index.to_string()),
|
||||||
|
|||||||
Reference in New Issue
Block a user