[GH-ISSUE #84] get_library_albums returns incorrect keys #62

Closed
opened 2026-02-27 22:07:49 +03:00 by kerem · 5 comments
Owner

Originally created by @rgoubet on GitHub (Sep 28, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/84

I noticed that the get_library_albums method returns data mapped to incorrect keys:

{
  "artists": "Album",
  "browseId": "MPREb_TcjAa6Gjdop",
  "thumbnails": [
    {
      "height": 226,
      "url": "https://lh3.googleusercontent.com/ZVOHvYxy66tBHPDD4DXnypgIC7d6FSuXs706ePGrv2U7rOU2tFjbnyEGTcfmy1PbKcZwMJnRS6NAguI9=w226-h226-l90-rj",
      "width": 226
    },
    {
      "height": 544,
      "url": "https://lh3.googleusercontent.com/ZVOHvYxy66tBHPDD4DXnypgIC7d6FSuXs706ePGrv2U7rOU2tFjbnyEGTcfmy1PbKcZwMJnRS6NAguI9=w544-h544-l90-rj",
      "width": 544
    }
  ],
  "title": "Evolution Ending",
  "trackCount": "1998",
  "type": "Album",
  "year": "Naked Funk"
}

As you can see, artists is set to the value of type, then trackCount and year are shifted, with the data of the former actually missing.

Originally created by @rgoubet on GitHub (Sep 28, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/84 I noticed that the `get_library_albums` method returns data mapped to incorrect keys: ```json { "artists": "Album", "browseId": "MPREb_TcjAa6Gjdop", "thumbnails": [ { "height": 226, "url": "https://lh3.googleusercontent.com/ZVOHvYxy66tBHPDD4DXnypgIC7d6FSuXs706ePGrv2U7rOU2tFjbnyEGTcfmy1PbKcZwMJnRS6NAguI9=w226-h226-l90-rj", "width": 226 }, { "height": 544, "url": "https://lh3.googleusercontent.com/ZVOHvYxy66tBHPDD4DXnypgIC7d6FSuXs706ePGrv2U7rOU2tFjbnyEGTcfmy1PbKcZwMJnRS6NAguI9=w544-h544-l90-rj", "width": 544 } ], "title": "Evolution Ending", "trackCount": "1998", "type": "Album", "year": "Naked Funk" } ``` As you can see, `artists` is set to the value of `type`, then `trackCount` and `year` are shifted, with the data of the former actually missing.
kerem 2026-02-27 22:07:49 +03:00
  • closed this issue
  • added the
    yt-update
    label
Author
Owner

@sigma67 commented on GitHub (Sep 28, 2020):

It seems YouTube has changed the way these are displayed, causing a mismatch in key assignment.

<!-- gh-comment-id:699867570 --> @sigma67 commented on GitHub (Sep 28, 2020): It seems YouTube has changed the way these are displayed, causing a mismatch in key assignment.
Author
Owner

@rgoubet commented on GitHub (Sep 28, 2020):

Will you fix this in a next release?

<!-- gh-comment-id:700187346 --> @rgoubet commented on GitHub (Sep 28, 2020): Will you fix this in a next release?
Author
Owner

@sigma67 commented on GitHub (Sep 28, 2020):

I'll do a new release by the end of this week, just to see if anything else pops up by then.

In the meantime, you can always do pip install git+https://github.com/sigma67/ytmusicapi to install the latest version on your system.

<!-- gh-comment-id:700211342 --> @sigma67 commented on GitHub (Sep 28, 2020): I'll do a new release by the end of this week, just to see if anything else pops up by then. In the meantime, you can always do `pip install git+https://github.com/sigma67/ytmusicapi` to install the latest version on your system.
Author
Owner

@rgoubet commented on GitHub (Sep 29, 2020):

Thank you! :-)

<!-- gh-comment-id:700503719 --> @rgoubet commented on GitHub (Sep 29, 2020): Thank you! :-)
Author
Owner

@sigma67 commented on GitHub (Oct 4, 2020):

Released v0.10.1

bdbaada

<!-- gh-comment-id:703297294 --> @sigma67 commented on GitHub (Oct 4, 2020): Released v0.10.1 bdbaada
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#62
No description provided.