sxyprn update (no formats)

This commit is contained in:
Simon
2026-06-25 20:53:51 +00:00
parent e4a84f34ee
commit 82d22e99f7
4 changed files with 29 additions and 55 deletions

View File

@@ -117,6 +117,8 @@ pub struct VideoItem {
pub aspectRatio: Option<f32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub playbackMethod: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub http_headers: Option<HashMap<String, String>>,
}
impl VideoItem {
pub fn new(
@@ -148,6 +150,7 @@ impl VideoItem {
preview: None,
aspectRatio: None,
playbackMethod: None,
http_headers: None,
}
}
pub fn from(s: String) -> Result<Self, serde_json::Error> {
@@ -202,6 +205,11 @@ impl VideoItem {
self
}
pub fn http_headers(mut self, headers: HashMap<String, String>) -> Self {
self.http_headers = Some(headers);
self
}
/// Re-applies the request host to every host-relative proxy URL on this item
/// (its `url`, `preview`, and each format's `url`). Cached items may have been
/// built without a host; see [`crate::providers::ensure_proxy_url_host`].