[GH-ISSUE #334] Artist names with '&' give incorrect year field #259

Closed
opened 2026-02-27 22:08:52 +03:00 by kerem · 0 comments
Owner

Originally created by @VishBK on GitHub (Dec 31, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/334

Using the get_library_albums function, albums with artists that have an '&' in their name return the second artist's name as the year field. Example response:

{'browseId': 'MPREb_tpOks8GBUtI',
 'playlistId': 'OLAK5uy_nxrLMCTf1MNMmqe-AJCGa2YJygwfFM5gI',
 'title': 'Alfredo',
 'thumbnails': [{'url': 'https://lh3.googleusercontent.com/urOSoW8NJs-3fS3gpPKLtvQFOj2xI3MuLgD6vbk9hMnotB6bnIZep0NR23Aget96fynf8Hv01cJ0ZUI=w226-h226-l90-rj', 'width': 226, 'height': 226}, {'url': 'https://lh3.googleusercontent.com/urOSoW8NJs-3fS3gpPKLtvQFOj2xI3MuLgD6vbk9hMnotB6bnIZep0NR23Aget96fynf8Hv01cJ0ZUI=w544-h544-l90-rj', 'width': 544, 'height': 544}], 
 'type': 'Album',
 'year': 'Freddie Gibbs',
 'artists': [{'name': 'The Alchemist', 'id': 'UC2Eotb0QaPkaJI4Cw4oHZ6Q'}]}

Here is the link to the album

May also affect get_album, you can see a similar issue in the 'other_versions' year field here in the documentation.

On version 0.24.1

Originally created by @VishBK on GitHub (Dec 31, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/334 Using the `get_library_albums` function, albums with artists that have an '&' in their name return the second artist's name as the year field. Example response: ```python {'browseId': 'MPREb_tpOks8GBUtI', 'playlistId': 'OLAK5uy_nxrLMCTf1MNMmqe-AJCGa2YJygwfFM5gI', 'title': 'Alfredo', 'thumbnails': [{'url': 'https://lh3.googleusercontent.com/urOSoW8NJs-3fS3gpPKLtvQFOj2xI3MuLgD6vbk9hMnotB6bnIZep0NR23Aget96fynf8Hv01cJ0ZUI=w226-h226-l90-rj', 'width': 226, 'height': 226}, {'url': 'https://lh3.googleusercontent.com/urOSoW8NJs-3fS3gpPKLtvQFOj2xI3MuLgD6vbk9hMnotB6bnIZep0NR23Aget96fynf8Hv01cJ0ZUI=w544-h544-l90-rj', 'width': 544, 'height': 544}], 'type': 'Album', 'year': 'Freddie Gibbs', 'artists': [{'name': 'The Alchemist', 'id': 'UC2Eotb0QaPkaJI4Cw4oHZ6Q'}]} ``` [Here is the link to the album](https://music.youtube.com/playlist?list=OLAK5uy_nxrLMCTf1MNMmqe-AJCGa2YJygwfFM5gI&feature=share) May also affect `get_album`, you can see a similar issue in the 'other_versions' year field [here in the documentation](https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.get_album). On version 0.24.1
kerem 2026-02-27 22:08:52 +03:00
  • closed this issue
  • added the
    bug
    label
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#259
No description provided.