Skip to content

[YouTube] Fix fetching playlists continuations#1518

Open
AudricV wants to merge 1 commit into
TeamNewPipe:devfrom
AudricV:yt_fix-playlists-continuations
Open

[YouTube] Fix fetching playlists continuations#1518
AudricV wants to merge 1 commit into
TeamNewPipe:devfrom
AudricV:yt_fix-playlists-continuations

Conversation

@AudricV

@AudricV AudricV commented Jun 25, 2026

Copy link
Copy Markdown
Member

The commit message explains the reason of the crash. This fix also points that the paging system in the extractor has to be rewritten, as we have multiple IDs systems and we have to pass custom data in some pages.

Fixes TeamNewPipe/NewPipe#13593
Supersedes #1510

isCoursePlaylist method uses getPlaylistHeader which uses
browseMetadataResponse, only not null for a YoutubePlaylistExtractor
instance in which the initial response has been fetched.

As the extractor API allows to use a new extractor instance to fetch a
page, we pass the isCoursePlaylist method result in the Page objects
instead, in order to make the extraction of streams of continuations
work properly.
@AudricV AudricV added bug Issue or PR is related to a bug YouTube Service, https://www.youtube.com/ labels Jun 25, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
16.0% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@absurdlylongusername absurdlylongusername left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this a regression, a bug that's always existed, or a new issue caused by YT?

Also please add tests that verify the code works with the fix and fails without the fix.

@AudricV

AudricV commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

This is a regression introduced by 27bbabc, but the original code was failing too and this was hidden in a try-catch block.

I don't really know how can I test that. Some existing tests like the continuations one can be changed to use a new PlaylistExtractor instance on each new Page got, or we can add a new one on a playlist which has continuations (and it should be a new one which is not already extracted). This question can be also raised on every extractor using the paging system of the extractor, across services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue or PR is related to a bug YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[YouTube] Cannot load playlists continuations after 100 videos

2 participants