fix: response models
This commit is contained in:
parent
9da166304a
commit
17094d121b
5 changed files with 17 additions and 16 deletions
|
|
@ -155,6 +155,7 @@ pub enum TimeOverlayStyle {
|
|||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MusicItem {
|
||||
pub thumbnail: MusicThumbnailRenderer,
|
||||
#[serde(default)]
|
||||
#[serde_as(deserialize_as = "DefaultOnError")]
|
||||
pub playlist_item_data: Option<PlaylistItemData>,
|
||||
#[serde_as(as = "VecSkipError<_>")]
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ pub struct Format {
|
|||
#[serde_as(as = "JsonString")]
|
||||
pub content_length: u64,
|
||||
|
||||
#[serde(default)]
|
||||
#[serde_as(deserialize_as = "DefaultOnError")]
|
||||
pub quality: Option<Quality>,
|
||||
pub fps: Option<u8>,
|
||||
|
|
@ -89,6 +90,7 @@ pub struct Format {
|
|||
pub color_info: Option<ColorInfo>,
|
||||
|
||||
// Audio only
|
||||
#[serde(default)]
|
||||
#[serde_as(deserialize_as = "DefaultOnError")]
|
||||
pub audio_quality: Option<AudioQuality>,
|
||||
#[serde_as(as = "Option<JsonString>")]
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ pub struct HeaderRenderer {
|
|||
pub playlist_id: String,
|
||||
#[serde_as(as = "crate::serializer::text::Text")]
|
||||
pub title: String,
|
||||
#[serde(default)]
|
||||
#[serde_as(as = "DefaultOnError<Option<crate::serializer::text::Text>>")]
|
||||
pub description_text: Option<String>,
|
||||
/// `"495", " videos"`
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ pub enum VideoResultsItem {
|
|||
owner: VideoOwner,
|
||||
#[serde_as(as = "crate::serializer::text::Text")]
|
||||
description: String,
|
||||
#[serde(default)]
|
||||
#[serde_as(deserialize_as = "DefaultOnError")]
|
||||
metadata_row_container: Option<MetadataRowContainer>,
|
||||
},
|
||||
|
|
@ -337,16 +338,12 @@ pub struct Comment {
|
|||
#[derive(Clone, Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CommentRenderer {
|
||||
/*
|
||||
#[serde_as(as = "crate::serializer::text::Text")]
|
||||
pub author_text: String,
|
||||
pub author_thumbnail: Thumbnails,
|
||||
pub author_endpoint: AuthorEndpoint,
|
||||
*/
|
||||
// There may be comments with missing authors (possibly deleted users?)
|
||||
#[serde(default)]
|
||||
#[serde_as(as = "DefaultOnError<Option<crate::serializer::text::Text>>")]
|
||||
pub author_text: Option<String>,
|
||||
pub author_thumbnail: Thumbnails,
|
||||
#[serde(default)]
|
||||
#[serde_as(as = "DefaultOnError")]
|
||||
pub author_endpoint: Option<AuthorEndpoint>,
|
||||
|
||||
|
|
|
|||
Reference in a new issue