fix!: parse full video info from playlist items, remove PlaylistVideo model

This commit is contained in:
ThetaDev 2023-05-13 21:14:18 +02:00
parent 54f42bcb54
commit bf80db8a9a
21 changed files with 105688 additions and 42159 deletions

View file

@ -510,7 +510,7 @@ pub struct Playlist {
/// Playlist name
pub name: String,
/// Playlist videos
pub videos: Paginator<PlaylistVideo>,
pub videos: Paginator<VideoItem>,
/// Number of videos in the playlist
pub video_count: u64,
/// Playlist thumbnail
@ -528,22 +528,6 @@ pub struct Playlist {
pub visitor_data: Option<String>,
}
/// YouTube video extracted from a playlist
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[non_exhaustive]
pub struct PlaylistVideo {
/// Unique YouTube video ID
pub id: String,
/// Video title
pub name: String,
/// Video length in seconds
pub length: u32,
/// Video thumbnail
pub thumbnail: Vec<Thumbnail>,
/// Channel of the video
pub channel: ChannelId,
}
/// Channel identifier
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[non_exhaustive]