diff --git a/src/client/music_artist.rs b/src/client/music_artist.rs index b16dab4..12e79d4 100644 --- a/src/client/music_artist.rs +++ b/src/client/music_artist.rs @@ -166,7 +166,7 @@ fn map_artist_page( lang: crate::param::Language, skip_extendables: bool, ) -> Result)>, ExtractionError> { - // dbg!(&self); + // dbg!(&res); let header = res.header.music_immersive_header_renderer; @@ -272,6 +272,13 @@ fn map_artist_page( .map(|m| m.as_str().to_owned()) }); + let radio_id = header.start_radio_button.and_then(|b| { + b.button_renderer + .navigation_endpoint + .watch_endpoint + .and_then(|w| w.playlist_id) + }); + Ok(MapResult { c: ( MusicArtist { @@ -292,6 +299,7 @@ fn map_artist_page( similar_artists: mapped.c.artists, tracks_playlist_id, videos_playlist_id, + radio_id, }, album_page_params, ), diff --git a/src/client/response/music_artist.rs b/src/client/response/music_artist.rs index 811432b..e27f3a0 100644 --- a/src/client/response/music_artist.rs +++ b/src/client/response/music_artist.rs @@ -5,7 +5,7 @@ use crate::serializer::text::Text; use super::{ music_item::{ - Grid, ItemSection, MusicThumbnailRenderer, SimpleHeader, SingleColumnBrowseResult, + Button, Grid, ItemSection, MusicThumbnailRenderer, SimpleHeader, SingleColumnBrowseResult, }, SectionList, Tab, }; @@ -41,6 +41,9 @@ pub(crate) struct MusicHeaderRenderer { #[serde(default)] #[serde_as(as = "DefaultOnError")] pub share_endpoint: Option, + #[serde(default)] + #[serde_as(as = "DefaultOnError")] + pub start_radio_button: Option