[GH-ISSUE #246] albums with >200 songs #192

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

Originally created by @quantenschaum on GitHub (Dec 18, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/246

First, many thanks for this library!

I just discovered that albums with more than 200 songs only list the first 200 entries. (example)

The official webui also shows only the first 200 songs, but playback in the browser does continue, but the playlist is capped at 200.

The official YTM app does only show the first 200 songs of an album, too. But playback also continues and all songs are shown in the current playlist (not int he album though).

So, what can be done to fix this?

Originally created by @quantenschaum on GitHub (Dec 18, 2021). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/246 First, many thanks for this library! I just discovered that albums with more than 200 songs only list the first 200 entries. ([example](https://music.youtube.com/playlist?list=OLAK5uy_ln_o1YXFqK4nfiNuTfhJK2XcRNCxml0fY)) The official webui also shows only the first 200 songs, but playback in the browser does continue, but the playlist is capped at 200. The official YTM app does only show the first 200 songs of an album, too. But playback also continues and all songs are shown in the current playlist (not int he album though). So, what can be done to fix this?
kerem 2026-02-27 22:08:31 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sigma67 commented on GitHub (Dec 18, 2021):

I suppose you can use get_watch_playlist in that case to get the full album? Since that API call is responsible for getting the watch playlist contents.

<!-- gh-comment-id:997283826 --> @sigma67 commented on GitHub (Dec 18, 2021): I suppose you can use `get_watch_playlist` in that case to get the full album? Since that API call is responsible for getting the watch playlist contents.
Author
Owner

@quantenschaum commented on GitHub (Dec 19, 2021):

I tried to use get_watch_playlist like this

a=ytm.get_album("some_browse_id")
c=a["trackCount"] # this is the actual number of tracks >200, a["tracks"] is limited to 200
p=ytm.get_watch_playlist(playlistId=a["audioPlaylistId"], limit=c)

but this results in

Traceback (most recent call last):
  File "./ytmdl", line 385, in <module>
    main()
  File "./ytmdl", line 298, in main
    playlist = ytm.get_watch_playlist(
  File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/mixins/watch.py", line 95, in get_watch_playlist
    get_continuations(results, 'playlistPanelContinuation', limit - len(tracks),
  File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 58, in get_continuations
    additionalParams = get_continuation_params(results, ctoken_path)
  File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 101, in get_continuation_params
    ctoken = nav(results,
  File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 155, in nav
    raise err
  File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 149, in nav
    root = root[k]
KeyError: 'nextRadioContinuationData'
<!-- gh-comment-id:997453083 --> @quantenschaum commented on GitHub (Dec 19, 2021): I tried to use `get_watch_playlist` like this ```python a=ytm.get_album("some_browse_id") c=a["trackCount"] # this is the actual number of tracks >200, a["tracks"] is limited to 200 p=ytm.get_watch_playlist(playlistId=a["audioPlaylistId"], limit=c) ``` but this results in ``` Traceback (most recent call last): File "./ytmdl", line 385, in <module> main() File "./ytmdl", line 298, in main playlist = ytm.get_watch_playlist( File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/mixins/watch.py", line 95, in get_watch_playlist get_continuations(results, 'playlistPanelContinuation', limit - len(tracks), File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 58, in get_continuations additionalParams = get_continuation_params(results, ctoken_path) File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 101, in get_continuation_params ctoken = nav(results, File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 155, in nav raise err File "/home/al/.local/lib/python3.8/site-packages/ytmusicapi/parsers/utils.py", line 149, in nav root = root[k] KeyError: 'nextRadioContinuationData' ```
Author
Owner

@quantenschaum commented on GitHub (Dec 19, 2021):

When I set the parameter limit=100, the same error occurs. When I set limit=25 or leave it unset, I get 50 tracks in the returned structure.

<!-- gh-comment-id:997453789 --> @quantenschaum commented on GitHub (Dec 19, 2021): When I set the parameter `limit=100`, the same error occurs. When I set `limit=25` or leave it unset, I get 50 tracks in the returned structure.
Author
Owner

@quantenschaum commented on GitHub (Dec 19, 2021):

FYI - passing the audioPlaylistId to youtube-dl causes it to download the playlist, but is limited to the first 100 entries.

<!-- gh-comment-id:997476750 --> @quantenschaum commented on GitHub (Dec 19, 2021): FYI - passing the `audioPlaylistId` to `youtube-dl` causes it to download the playlist, but is limited to the first 100 entries.
Author
Owner

@sigma67 commented on GitHub (Dec 20, 2021):

Good catch, that's a bug. I didn't consider audio playlists as possible inputs for the playlistId parameter. Will fix soon.

<!-- gh-comment-id:997719260 --> @sigma67 commented on GitHub (Dec 20, 2021): Good catch, that's a bug. I didn't consider audio playlists as possible inputs for the playlistId parameter. Will fix soon.
Author
Owner

@quantenschaum commented on GitHub (Dec 20, 2021):

Cool, seems to work. 👍

<!-- gh-comment-id:997818070 --> @quantenschaum commented on GitHub (Dec 20, 2021): Cool, seems to work. :+1:
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#192
No description provided.