feat: add channel playlists

- add tests for channel videos
- small model refactor (rename Channel to ChannelTag)
This commit is contained in:
ThetaDev 2022-09-26 20:36:01 +02:00
parent 45707c4d01
commit 6f1a1c4440
30 changed files with 16831 additions and 241 deletions

View file

@ -37,6 +37,7 @@ pub struct ContentsRenderer<T> {
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThumbnailsWrap {
#[serde(default)]
pub thumbnail: Thumbnails,
}
@ -45,6 +46,7 @@ pub struct ThumbnailsWrap {
#[derive(Default, Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Thumbnails {
#[serde(default)]
pub thumbnails: Vec<Thumbnail>,
}
@ -155,8 +157,6 @@ pub struct GridPlaylistRenderer {
pub title: String,
pub thumbnail: Thumbnails,
#[serde_as(as = "Text")]
pub published_time_text: String,
#[serde_as(as = "Text")]
pub video_count_short_text: String,
}
@ -244,6 +244,9 @@ pub struct TimeOverlay {
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TimeOverlayRenderer {
/// `29:54`
///
/// Is `LIVE` in case of a livestream
#[serde_as(as = "Text")]
pub text: String,
#[serde(default)]