[YouTubeBridge] Fix for change to YouTube playlists - #5026
Conversation
Pull request artifacts
last change: Sunday 2026-07-05 13:21:51 |
|
If you mention in your pull request message that it fixes, closes, or resolves an issue, as mentioned in https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword, then, if/when this pull request gets merged in, the issue will automatically be closed without manually having to close afterwards. I don't know if I can do it myself as I did not open the pull request, but it would be done as the following line. |
|
TIL. Thanks @TheJayMann I've updated the original PR note. |
|
Tested this on PHP 8.5 and it works. Playlists fail on master and come back correctly on your branch. The backtrack limit does get hit in practice too: LTT's uploads playlist has a 1.4 MB phpcs fails though: line 431 is indented with a tab, and |
|
@polybjorn Thanks for that. Tab indent should be fixed now. |
YouTube has made another change to the playlist pages, shifting around the ytInitialData JSON object structure. This adds cases for when the lockupViewModel objects are direct children of the itemSectionRenderer.
The ytInitialData JSON can also now be larger than 1 million characters in length for playlists with a large number of items (say over 90), exceeding the PCRE backtracking limit and causing the preg_match to fail and return 0 groups. I've added a workaround to temporarily increase the limit to 10 million just for the regex.
I've tested this on my local instance on a range of playlists and it all seems to be working fine for me now.
Fixes #5002