mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #562] get_playlist() format update #391
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#391
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 @heisen273 on GitHub (Mar 10, 2024).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/562
(Issue originated from this comment).
Currently

get_playlist()breaks with same KeyError as in https://github.com/sigma67/ytmusicapi/issues/544@sigma67 , As per your request, here's playlist screenshot
and full response dict:
response.json
@sigma67 commented on GitHub (Mar 10, 2024):
Yeah, same issue as with get_album. Thanks for the helpful data
@sigma67 commented on GitHub (Mar 11, 2024):
It seems your screenshot is for a public playlist and your response data for a different private playlist? And the title of the private playlist is Title with description Description?
Could you please also provide response data for a public playlist? And a screenshot for the private one if you don't mind (feel free to copy a public playlist to a private one if you mind the privacy).
It would be helpful to have matching screenshot & response data for both private and public playlist to be able to make some sense of it.
@heisen273 commented on GitHub (Mar 14, 2024):
hey, sorry for late reply.
my bad, here's a correct screenshot for provided earlier response.json
and also i've opened playlist for everyone with the link: https://music.youtube.com/playlist?list=PLaZPMsuQNCsWn0iVMtGbaUXO6z-EdZaZm
@jbrodriguez commented on GitHub (Mar 25, 2024):
the attached link looks different to me, not sure if it's because i'm not signed in
i'm trying to copy playlists from spotify to yt music, it's not working due to this issue
i tried to adapt https://github.com/sigma67/ytmusicapi/tree/fix-get-album-544, however i'm finding that the structure of the json is quite a bit different from what the code is expecting 🤷♂️
@sigma67 commented on GitHub (Mar 26, 2024):
@jbrodriguez you cannot reproduce it with your own account if you're not part of Google's A/B group for this test
You'll have to work with the JSON provided by affected users until the change is generally available
@jbrodriguez commented on GitHub (Mar 26, 2024):
@sigma67 got it !
i tinkered with it and fixed it for me (i copied playlists of ~500 songs without issues)
here's the patch for the fix, although as you mentioned it may work for my scenario (private playlists), it may not work for a general case (including public playlists)
0001-fix-get_playlist-functionality.patch
i'm posting it here as a reference, because i saw that there's some refactoring already in place regarding the playlist header
@sigma67 commented on GitHub (Apr 4, 2024):
You guys could help by providing more test data:
So far I only have a private playlist from a comment by @heisen273
CC @apastel
@apastel commented on GitHub (Apr 4, 2024):
Public playlist:
public_playlist.json
Private playlist:
private_playlist.json
Let me know if you need anything else 🤝
@sigma67 commented on GitHub (Apr 5, 2024):
Hi @apastel, thanks, that's already helpful!
What I meant though is a public playlist that is not owned by you. So the actual distinction here is between an "owned" and a "foreign" playlist, as that will make a difference in how it is presented to the user.
Could you provide a foreign playlist, i.e. one that you do not own, like one generated by YouTube Music?
@apastel commented on GitHub (Apr 5, 2024):
Whoops, yes that's an important distinction:
actual_public_playlist.json
@sigma67 commented on GitHub (Apr 5, 2024):
@apastel are you maybe not in the A/B test anymore? Your data is actually not the new format, but the old one
It has
singleColumnBrowseResultsRenderer, nottwoColumnBrowseResultsRendererIf you still have the error, maybe it is a different one? In that case can you screenshot the playlist?
@apastel commented on GitHub (Apr 5, 2024):
My bad (again), I forgot that my failing unit tests are using my "Test Brand" account, and I just gave you a playlist while logged into my personal account.
I can see that this json file contains the
twoColumnBrowseResultsRendererand it has the two-column format in my browser.actual_public_playlist.json
Let me know if you still need a private two-column playlist.
@hundredfire commented on GitHub (May 2, 2024):
Trying to provide more data:

private playlist screenshot, log and response.json:
private playlist.json
private playlist.log
And public playlist files (I'm not the owner):

public playlist.json
public playlist.log