mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 23:36:00 +03:00
[GH-ISSUE #282] Radio playlists are not dynamic #219
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#219
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 @MarvinSchenkel on GitHub (Jul 17, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/282
When calling the
get_watch_playlistwith a videoId and/or playlistId, I expect the result to be dynamic and change with every call, just like on YT Music whenever I start a radio based on a playlist for example.I do include the
RDAMPLin addition to my playlist ID, for exampleget_watch_playlist(playlistId="RDAMPLOLAK5uy_l_fKDQGOUsk8kbWsm9s86n4-nZNd2JR8Q").Am I missing something, or is this expected behaviour? I would love to get some dynamic content :-)
@sigma67 commented on GitHub (Jul 18, 2022):
It should in fact change with every call. I just verified with the radio playlist link you provided.
Are you sure the result is the same on every call for you?
@MarvinSchenkel commented on GitHub (Jul 18, 2022):
Alright, so the story gets even weirder. It seems to return 1 extra item after each subsequent call to the initial list of tracks. So for example, call 1:

Call 2:

Note the length of the list and the head of the list being exactly the same songs.
This is the exact code I am using to get the lists mentioned above:
I feel like I am missing something very obvious here, hope you can point me in the right direction 👍
@MarvinSchenkel commented on GitHub (Jul 26, 2022):
Same thing seems to be happening with individual songs as well, for example:
ytmapi.get_watch_playlist(videoId="oB4JhCwF8S8")keeps returning the same tracks as well. Also tried theytmapi.get_watch_playlist_shufflefunction, but that one throws an error:EDIT: This seems to happen when I call these methods in quick succession. Just for fun I tried the same call I posted last week, which now comes back with a different list than the one I posted.
Could this be caching on the google side?
@sigma67 commented on GitHub (Aug 2, 2022):
Thanks for being persistent, I now believe that this is indeed due to a difference in the requests sent by ytmusicapi vs the web app.
The key
tunerSettingValuehad been missing up to now, with it the results are consistently dynamic for me.Can you test with latest master and report back?
@MarvinSchenkel commented on GitHub (Aug 5, 2022):
Tested the new version, but unfortunately I still get the same results as before. So the list does change when I wait long enough, but when I run the code after 1min, the list is still the same as before.
@sigma67 commented on GitHub (Oct 1, 2022):
Well, I finally figured it out. Turns out setting
paramstowAEBis needed to properly randomize the result (i.e. get a radio playlist). I restructuredget_watch_playlista bit to fix this.