sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.59k stars 184 forks source link

create a *get_album_playlist_id* function #553

Closed spystrach closed 4 months ago

spystrach commented 4 months ago

Is your feature request related to a problem? Please describe. Hello, for a personal project, i use a lot the get_album_browse_id function that map for an album, the AudioPlaylistId to the BrowseId. But there is not a reciprocal function.

Describe the solution you'd like I would need to use a new function named get_album_playlist_id that would map the BrowseId to the AudioPlaylistId.

Describe alternatives you've considered I could run the get_album(browse_id)['audioPlaylistId'] to extract all the album info and keep only the playlist id, but i would like to keep things clean.

Additional context I already created this function that leverage the redirect from https://music.youtube.com/browse/browse_id. I could do a pull-request. test_success

sigma67 commented 4 months ago

What's the issue with get_album(browse_id)['audioPlaylistId'] ?

Feel free to write your own YTMusic class inheriting from YTMusic & add a wrapper around it, if you think it's too verbose.

spystrach commented 4 months ago

that's what i end up doing ! Initially my thought was to reduce api call but after diving into your code, it's the same. thanks for your response and you can close this issue.