Skip to content

Playlists: fix parsing error when some videos are paid for in a course #5207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChunkyProgrammer
Copy link
Contributor

@ChunkyProgrammer ChunkyProgrammer commented Mar 18, 2025

without this PR

  1. go to /playlist?list=PLmdFyQYShrjfOiKmTtgQFsdorN-0Aq2uJ
  2. notice that playlist page doesn't load
    image

with this PR

  1. go to /playlist?list=PLmdFyQYShrjfOiKmTtgQFsdorN-0Aq2uJ
  2. notice that playlist page now loads
    image

@ChunkyProgrammer ChunkyProgrammer requested a review from a team as a code owner March 18, 2025 12:58
@ChunkyProgrammer ChunkyProgrammer requested review from syeopite and removed request for a team March 18, 2025 12:58
index = i["navigationEndpoint"]["watchEndpoint"]["index"].as_i64
video_id = i.dig?("navigationEndpoint", "watchEndpoint", "videoId").try &.as_s || i.dig("videoId").as_s
plid = i.dig?("navigationEndpoint", "watchEndpoint", "playlistId").try &.as_s || playlist_id
index = i.dig?("navigationEndpoint", "watchEndpoint", "index").try &.as_i64 || i.dig("index", "simpleText").as_s.to_i64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
index = i.dig?("navigationEndpoint", "watchEndpoint", "index").try &.as_i64 || i.dig("index", "simpleText").as_s.to_i64
index = i.dig?("navigationEndpoint", "watchEndpoint", "index").try &.as_i64 || i.dig("index", "simpleText").as_i64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants