From a7db75ff075aebe57eaecf646008f583a10353b2 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Wed, 2 Nov 2022 16:58:07 +0100 Subject: [PATCH] WIP: new artistid model --- src/model/mod.rs | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/model/mod.rs b/src/model/mod.rs index 41fd5eb..cdbd2dd 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -875,15 +875,7 @@ pub struct TrackItem { /// Album cover pub cover: Vec, /// Artists of the track - /// - /// **Note:** this field only contains artists that have a link attached - /// to them. You may want to use `artists_txt` as a fallback. - pub artists: Vec, - /// Full content of the artists column - /// - /// Conjunction words/characters depend on language and fetched page. - /// Includes unlinked artists. - pub artists_txt: Option, + pub artists: Vec, /// Album of the track pub album: Option, /// View count @@ -914,6 +906,14 @@ pub struct ArtistItem { pub subscriber_count: Option, } +/// YouTube Music artist identifier +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[non_exhaustive] +pub struct ArtistId { + pub id: Option, + pub name: String, +} + /// YouTube Music album list item #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[non_exhaustive] @@ -925,12 +925,7 @@ pub struct AlbumItem { /// Album cover pub cover: Vec, /// Artists of the album - pub artists: Vec, - /// Full content of the artists field - /// - /// Conjunction words/characters depend on language and fetched page. - /// Includes unlinked artists. - pub artists_txt: String, + pub artists: Vec, /// Album type (Album/Single/EP) pub album_type: AlbumType, /// Release year of the album @@ -1019,12 +1014,7 @@ pub struct MusicAlbum { /// Album cover pub cover: Vec, /// Artists of the album - pub artists: Vec, - /// Full content of the artists field - /// - /// Conjunction words/characters depend on language and fetched page. - /// Includes unlinked artists. - pub artists_txt: String, + pub artists: Vec, /// Album type (Album/Single/EP) pub album_type: AlbumType, /// Release year