ytmusicapi icon indicating copy to clipboard operation
ytmusicapi copied to clipboard

`get_artist` episodes and shows, `get_artist_shows`, `get_artist_episodes`

Open H3adsho0ot opened this issue 1 year ago • 5 comments

If i browse an artist having audiobooks those are not shown in the result. I thik they should be shown as albums.

Steps to reproduce the behavior: (https://music.youtube.com/browse/MPADUCf2vTMnvFb8BsWTWauTZrow) <- example

If I execute yt.get_artist('UCyiY-0Af0O6emoI3YvCEDaA') I get two singles but no albums or playlist or anything else.

Thanks in advance Niklas

H3adsho0ot avatar Oct 19 '23 10:10 H3adsho0ot

Sorta related to #415 , need to update some functions to keep up with the content expansion in YTMusic

sigma67 avatar Oct 19 '23 11:10 sigma67

I modified the arrays in parse_artist_contents like this:

categories = ['albums', 'singles', 'videos', 'playlists', 'related', audiobooks and shows']
categories_local = [_('albums'), _('singles'), _('videos'), ('playlists'), ('related'), _('audiobooks and shows')]
categories_parser = [parse_album, parse_single, parse_video,  arse_playlist, parse_related_artist, parse_playlist ]

Result looks good to me

H3adsho0ot avatar Oct 19 '23 12:10 H3adsho0ot

That works for English only but needs to be localized to all supported languages

sigma67 avatar Oct 19 '23 13:10 sigma67

Should support two new categories for the artists page:

https://music.youtube.com/channel/UCf2vTMnvFb8BsWTWauTZrow

  • Shows and audiobooks - localized
  • Details page: new function get_artist_shows - this one's a bit strange still, the chip filter still shows "Albums" which are not shown when navigating there from "more" on the shows section. But when clicking on it both Albums and Shows appear. Seems they forgot a separate chip for Shows

https://music.youtube.com/channel/UCKPSmMfDsXTKrCZApukcJ7A

  • Latest episodes - localized
  • Details page: new function get_artist_episodes

sigma67 avatar Nov 11 '23 16:11 sigma67

Recently commented on another issue but was pointed here. When calling 'get_artist' for an artist with podcasts on their page, a KeyError is raised. For example, the first video on this page is marked as a podcast episode, for some unknown reason. Calling 'get_artist' with this artist ID results in a 'KeyError: 'watchEndpoint'' being raised. I do not know why this happens besides because of the podcast episode.

MarkhorDev avatar Jan 07 '24 17:01 MarkhorDev

episodes and podcasts are supported in get_artist since 1.6.0.

Audiobooks support is still missing. I am renaming the issue accordingly

sigma67 avatar Mar 13 '24 18:03 sigma67