Implement playlist pagination for the local API#2956
Implement playlist pagination for the local API#2956FreeTubeBot merged 2 commits intoFreeTubeApp:developmentfrom
Conversation
|
For invidious, it does give you a |
|
I haven't looked at Invidious' code but they are probably just sending the estimate that YouTube has on their page, I say estimate because that number also counts the videos that can't be played (privated, copyright striked or deleted) and are not shown in the playlist. So that number might be the same as the total number of videos but it lots of playlists, especially big ones, that number will always be larger than the total number of videos. ytpl and ytch both check for continuation data, Invidious doesn't seem to have that mechanism, or at least not exposed through the API |
|
eg. with page=1 (the same as not specify the page parameter) you get all 100 videos with page=2, you get the last 50 videos in the playlist, despite the playlist only having one page with page=3, you finally get an empty array of videos |
|
We should definitely open an issue on the invidious repo then |
PikachuEXE
left a comment
There was a problem hiding this comment.
Tested with
playlist with 100 videos, only a single page (check that load more button is hidden)
https://www.youtube.com/playlist?list=PL4fGSI1pDJn6puJdseH2Rt9sMvt9E2M4i
playlist with 872 videos, multiple pages
https://www.youtube.com/playlist?list=PLbMjU_TVMIFvmkQ871iUvE5gy5ezXc6hE
|
It appears to be a known invidious issue iv-org/invidious#2694 |
Implement playlist pagination for the local API
Pull Request Type
Description
This pull request implement pagination on the playlist page when the local API is selected. I also got rid of the unused methods and variables that were copied from the search page.
I didn't implement pagination for Invidious in this PR, as their pagination system is confusing, weird and will likely require talking to the Invidious devs to understand it or ask them to fix their system (see the discussion on Matrix for more details).
Testing
playlist with 100 videos, only a single page (check that load more button is hidden)
https://www.youtube.com/playlist?list=PL4fGSI1pDJn6puJdseH2Rt9sMvt9E2M4i
playlist with 872 videos, multiple pages
https://www.youtube.com/playlist?list=PLbMjU_TVMIFvmkQ871iUvE5gy5ezXc6hE
Desktop