sxyprn update (no formats)
This commit is contained in:
@@ -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`].
|
||||
|
||||
Reference in New Issue
Block a user