fix: add new attributed_text description
add mapping tests for video_details
This commit is contained in:
parent
0659a64361
commit
bf97f31173
19 changed files with 32747 additions and 9856 deletions
|
|
@ -91,6 +91,7 @@ pub struct GridVideoRenderer {
|
|||
pub title: String,
|
||||
#[serde_as(as = "Option<Text>")]
|
||||
pub published_time_text: Option<String>,
|
||||
/// Contains `No views` if the view count is zero
|
||||
#[serde_as(as = "Option<Text>")]
|
||||
pub view_count_text: Option<String>,
|
||||
/// Contains video length
|
||||
|
|
@ -119,6 +120,7 @@ pub struct CompactVideoRenderer {
|
|||
/// (e.g. `11 months ago`)
|
||||
#[serde_as(as = "Option<Text>")]
|
||||
pub published_time_text: Option<String>,
|
||||
/// Contains `No views` if the view count is zero
|
||||
#[serde_as(as = "Option<Text>")]
|
||||
pub view_count_text: Option<String>,
|
||||
/// Badges are displayed on the video thumbnail and
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use crate::serializer::text::TextComponents;
|
|||
use crate::serializer::MapResult;
|
||||
use crate::serializer::{
|
||||
ignore_any,
|
||||
text::{AccessibilityText, Text},
|
||||
text::{AccessibilityText, AttributedText, Text},
|
||||
VecLogError,
|
||||
};
|
||||
|
||||
|
|
@ -87,8 +87,9 @@ pub enum VideoResultsItem {
|
|||
#[serde(rename_all = "camelCase")]
|
||||
VideoSecondaryInfoRenderer {
|
||||
owner: VideoOwner,
|
||||
#[serde(default)]
|
||||
description: TextComponents,
|
||||
description: Option<TextComponents>,
|
||||
#[serde_as(as = "Option<AttributedText>")]
|
||||
attributed_description: Option<TextComponents>,
|
||||
/// Additional metadata (e.g. Creative Commons License)
|
||||
#[serde(default)]
|
||||
#[serde_as(deserialize_as = "DefaultOnError")]
|
||||
|
|
|
|||
Reference in a new issue