You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discover infinite scroll stops after one page when TMDB returns a short page (e.g. sort by Release Date Descending) #3654
On Discover → Movies, sorting by Release Date Descending shows only ~19 titles and never loads more, while the default Popularity Descending keeps loading indefinitely.
Cause:src/hooks/useDiscover.ts ends the list when the last page has fewer than 20 results:
TMDB's /discover/movie does not guarantee 20 results per page. With sort_by=release_date.desc it regularly returns 19 on a page (measured on 3.5.1, pages 1-15: 19,20,20,20,19,20,...; popularity: 20 on all 15), while total_pages is 1000 and total_results 20000. One short page makes the client believe it reached the end, so the list stops after page 1 (or wherever the first short page falls). The same applies to any discover slider/sort whose TMDB page comes back short.
Expected: keep paging until page >= totalPages.
Suggested fix: decide the end from the page counter, not the page size, e.g.
in place of the results.length < 20 clause. The existing de-duplication (resultIds) already copes with overlapping pages. (Related history: #1649 adjusted the same end-of-pagination check.)
Version
3.5.1 (ghcr.io/seerr-team/seerr:latest); the check is unchanged on develop
Steps to Reproduce
Go to Discover → Movies
Set Sort to Release Date Descending
Scroll down
No further pages load. GET /api/v1/discover/movies?page=1&sortBy=release_date.desc returns 19 results, so isReachingEnd becomes true and page 2 is never requested.
Screenshots
No response
Logs
Platform
desktop
Database
SQLite (default)
Device
Desktop PC (also reproduces for other household devices, since the check is client-side)
Operating System
Windows 11 (server: Docker on Linux)
Browser
Chrome
Additional Context
Workaround we run meanwhile: server-side, top a short TMDB discover page up to 20 with the first new titles of the next page (the client de-dupes them). With that in place the same sort loads 65+ pages / 1,269+ posters in Chrome instead of stopping at page 1, which confirms the short page is the only trigger. A client-side fix as suggested above would make the workaround unnecessary.
The "< 20" check is a real problem and we'll fix it, but this report reads like AI output, and the explanation it gives is wrong.
"useDiscover" loads 3 pages up front and only checks the last loaded page, so page 2 is always requested and a short first page doesn't stop the list at around 19 titles. With the page sizes you posted, it would stop after page 5. Your repro steps describe what the AI assumed the code does, not what you actually observed.
This is exactly why we don't want AI-generated bug reports. We don't need you to diagnose the issue, walk us through the code or suggest a fix. That's our job. We need a clear description of what happened, steps to reproduce it, your logs and your setup, written in your own words and submitted through the issue template.
If you understand what's happening in the code, put that in the Additional Context section. Don't have AI generate a diagnosis for you. That's how you end up with repro steps that don't match the actual behaviour, and it just gives us more work to verify the report before we can even investigate the bug.
Activity
fallenbagel commentedon Oct 27, 2026
The "< 20" check is a real problem and we'll fix it, but this report reads like AI output, and the explanation it gives is wrong.
"useDiscover" loads 3 pages up front and only checks the last loaded page, so page 2 is always requested and a short first page doesn't stop the list at around 19 titles. With the page sizes you posted, it would stop after page 5. Your repro steps describe what the AI assumed the code does, not what you actually observed.
This is exactly why we don't want AI-generated bug reports. We don't need you to diagnose the issue, walk us through the code or suggest a fix. That's our job. We need a clear description of what happened, steps to reproduce it, your logs and your setup, written in your own words and submitted through the issue template.
If you understand what's happening in the code, put that in the Additional Context section. Don't have AI generate a diagnosis for you. That's how you end up with repro steps that don't match the actual behaviour, and it just gives us more work to verify the report before we can even investigate the bug.
Our AI policy applies to issues too:
https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice
Keep that in mind for future reports.
kitchjp commentedon Oct 27, 2026
fix(discover): keep paging past short and failed TMDB pages
fix(discover): keep paging past short and failed TMDB pages