isLive implemented

This commit is contained in:
Simon
2026-03-10 17:54:16 +00:00
parent 967d1e8143
commit efb1eb3c91
2 changed files with 9 additions and 0 deletions

View File

@@ -293,6 +293,7 @@ impl ChaturbateProvider {
thumb,
0,
)
.is_live(true)
.views(views as u32)
.uploader(username.clone())
.uploader_url(video_url.clone())

View File

@@ -83,6 +83,8 @@ pub struct VideoEmbed {
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
pub struct VideoItem {
pub duration: u32, // 110,
#[serde(default)]
pub isLive: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub views: Option<u32>, // 14622653,
#[serde(skip_serializing_if = "Option::is_none")]
@@ -123,6 +125,7 @@ impl VideoItem {
) -> Self {
VideoItem {
duration: duration, // Placeholder, adjust as needed
isLive: false,
views: None, // Placeholder, adjust as needed
rating: None, // Placeholder, adjust as needed
id,
@@ -202,6 +205,11 @@ impl VideoItem {
self.aspectRatio = Some(aspect_ratio);
self
}
pub fn is_live(mut self, is_live: bool) -> Self {
self.isLive = is_live;
self
}
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]