mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-26 07:46:00 +03:00
[GH-ISSUE #257] Album tracks info (in get_album) returns "None" for artists and album #201
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SubjunctiveQuaver on GitHub (Feb 1, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/257
See the image below for an example where the album chosen was Reputation by Taylor Swift (browse ID: MPREb_BdDqjcHkOwb) with the track being "...Ready For It?":
Minimal working example:
I would expect it to contain "Taylor Swift" for the artist and "Reputation" for the album.
@sigma67 commented on GitHub (Feb 1, 2022):
The album details are on the top level in
titleandartistskeys, not in the individual tracks in thetrackskey. I agree it would be more intuitive to include it with each track as well instead of putting None, it's just a limitation of how the parsing works currently@natumbri commented on GitHub (May 28, 2022):
Hi @sigma67 - I know this is closed, but just wondering if instead of returning
albumas astr, have you considered returning it as adict:Just means if the track gets separated from the album, it is easy to get it back again.
This would be consistent with how
YTMusic.searchreturnssong,YTMusic.get_homereturnssong quick pick,YTMusic.get_song_relatedreturnsYou might also likeitems,YTMusic.get_watch_playlistandYTMusic.get_playlistreturntracks.The only other track/song where album is returned as a
strissongsinYTMusic.get_artist- but that might be because for that result, there is no way to easily know the browseId for the album. I guess you'd have to find it in thealbumsreturned byYTMusic.get_artist, by matching the name?