isLive implemented
This commit is contained in:
@@ -293,6 +293,7 @@ impl ChaturbateProvider {
|
|||||||
thumb,
|
thumb,
|
||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
|
.is_live(true)
|
||||||
.views(views as u32)
|
.views(views as u32)
|
||||||
.uploader(username.clone())
|
.uploader(username.clone())
|
||||||
.uploader_url(video_url.clone())
|
.uploader_url(video_url.clone())
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ pub struct VideoEmbed {
|
|||||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||||
pub struct VideoItem {
|
pub struct VideoItem {
|
||||||
pub duration: u32, // 110,
|
pub duration: u32, // 110,
|
||||||
|
#[serde(default)]
|
||||||
|
pub isLive: bool,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub views: Option<u32>, // 14622653,
|
pub views: Option<u32>, // 14622653,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@@ -123,6 +125,7 @@ impl VideoItem {
|
|||||||
) -> Self {
|
) -> Self {
|
||||||
VideoItem {
|
VideoItem {
|
||||||
duration: duration, // Placeholder, adjust as needed
|
duration: duration, // Placeholder, adjust as needed
|
||||||
|
isLive: false,
|
||||||
views: None, // Placeholder, adjust as needed
|
views: None, // Placeholder, adjust as needed
|
||||||
rating: None, // Placeholder, adjust as needed
|
rating: None, // Placeholder, adjust as needed
|
||||||
id,
|
id,
|
||||||
@@ -202,6 +205,11 @@ impl VideoItem {
|
|||||||
self.aspectRatio = Some(aspect_ratio);
|
self.aspectRatio = Some(aspect_ratio);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_live(mut self, is_live: bool) -> Self {
|
||||||
|
self.isLive = is_live;
|
||||||
|
self
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||||
|
|||||||
Reference in New Issue
Block a user