mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-26 07:46:00 +03:00
[GH-ISSUE #242] 2021 Recap playlist breaking get_playlist #187
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#187
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 @kenbier on GitHub (Dec 11, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/242
Python 3.9, ytmusicapi 0.19.5
I am trying to pull the 2021 Recap playlist. When I pull a different playlist (change index on first line to 0, 2, etc) the code works.
Seems to be the 2021 Recap playlist only.
code:
Stack trace:
@kenbier commented on GitHub (Dec 11, 2021):
I believe the issue is that you are assuming the playlist year is in fifth index of the subtitle runs here. I.e.
However for the 2021 recap it looks like this:
You should guard against the case where the runs list is EXACTLY 4 in length, which is causing the index out of bounds (different schema). You can look for the playlist year elsewhere or just set it to be empty.
@sigma67 commented on GitHub (Dec 11, 2021):
Unfortunately I don't have access to the recap yet so I can't test it. I don't suppose it's shareable?
I think we should change > 3 to = 5 to be more precise.
@kenbier commented on GitHub (Dec 11, 2021):
That seems like the right fix yes, since you are assuming the fifth index is non null. If it is null, just ignoring the year seems like the simplest action for now.
If you want a 2021 Recap test case, you need to save your 2021 Recap as a playlist and make it pubic before the API can access it I believe.