isLive implemented
This commit is contained in:
@@ -293,6 +293,7 @@ impl ChaturbateProvider {
|
||||
thumb,
|
||||
0,
|
||||
)
|
||||
.is_live(true)
|
||||
.views(views as u32)
|
||||
.uploader(username.clone())
|
||||
.uploader_url(video_url.clone())
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user