Example #1
0
        public static RelatedArtists FromMusicCarouselShelfRenderer(MusicCarouselShelfRenderer renderer)
        {
            RelatedArtists relatedArtists = new RelatedArtists();

            foreach (var content in renderer.Contents)
            {
                relatedArtists.Artists.Add(RelatedArtist.FromMusicTwoRowItemRenderer(content.MusicTwoRowItemRenderer));
            }

            return(relatedArtists);
        }
Example #2
0
        public static RelatedArtist FromMusicTwoRowItemRenderer(MusicTwoRowItemRenderer renderer)
        {
            RelatedArtist artist = new RelatedArtist();

            artist.Thumbnails = renderer.ThumbnailRenderer.MusicThumbnailRenderer.Thumbnail.Thumbnails;

            if (renderer.Subtitle != null)
            {
                artist.Subscribers = renderer.Subtitle.Runs[0].Text;
            }

            artist.Name      = renderer.Title.Runs[0].Text;
            artist.ChannelId = renderer.Title.Runs[0].NavigationEndpoint.BrowseEndpoint.BrowseId;

            return(artist);
        }