Describe the bug
Created a TMDB list (https://www.themoviedb.org/list/142989) and Radarr only grabs the first 20 movies. List has 60+ movies.
To Reproduce
Add TMDB list. Wait. See only the first 20 grabbed.
Expected behavior
Radarr should fetch all results from list using TMDB's V4 List API. Doesn't look like Radarr is performing the pagination needed in TMDB's V4 API. This is different from their V3 API which grabs the entire list within one request.
Attempted this in RadarrV2 and it grabs the full TMDB list.
Version:
Debug Logs
2020-5-17 22:44:30.1|Info|TMDbListImport|Importing TMDb movies from list: 142989
2020-5-17 22:44:30.1|Debug|TMDbListImport|Downloading List https://api.themoviedb.org/4/list/142989
2020-5-17 22:44:30.1|Trace|RateLimitService|Rate Limit triggered, delaying 'api.themoviedb.org' for 0.039 sec
2020-5-17 22:44:30.1|Trace|HttpClient|Req: [GET] https://api.themoviedb.org/4/list/142989
2020-5-17 22:44:30.1|Trace|ConfigService|Using default config value for 'proxyenabled' defaultValue:'False'
2020-5-17 22:44:30.5|Trace|HttpClient|Res: [GET] https://api.themoviedb.org/4/list/142989: 200.OK (329 ms)
2020-5-17 22:44:30.5|Debug|NetImportSearchService|Found 20 movies from list(s) Recent Releases
2020-5-17 22:44:30.5|Debug|MovieService|Updating 0 movie
2020-5-17 22:44:30.5|Debug|MovieService|0 movie updated
V4 documentation: https://developers.themoviedb.org/4/list/get-list
V3 documentation: https://developers.themoviedb.org/3/lists/get-list-details
Looks like V4 provides a 'total_results' value within the response. This divided by 20 could enable pagination.
Please confirm version number. Up to date isn't helpful.
@ta264 Added to original post.
Version 3.0.0.2968. linuxserver/radarr:preview
Thanks. What sort of list? Popular for example has pagination
https://github.com/Radarr/Radarr/blob/e52005fa35f43f3b17c6de2dc9c6850f548878cb/src/NzbDrone.Core/NetImport/TMDb/Popular/TMDbPopularRequestGenerator.cs#L99
The list is a user created list.
Popular does seem to have pagination. Assuming I understand the application schema, that code would basically just need to be replicated somewhere in here:
Yep, looks like it needs adding.
PS thanks for digging into the code!
Nice Catch... With the small page size we could easily end up doing well over 100 requests if we try to go for the full lists items... We may want to limit it somewhere, though I would agree it should be higher than 3 pages.
@Qstick For sure. Maybe 5 pages (i.e. 100 results) would be okay.
Slightly disappointing for TMDB to move their list API in that direction. Their V3 list API is able to grab hundreds of movies at a time within one request which is way more useful (at least, for my uses). Maybe it's overly abused in its current state.
I don't believe they're going to retire V3 API any time soon as V4 still has a long way to go. I would think V3 would be the simplest implementation & produce the best outcome for end users, unless you're set on the V4 API. Of course, there's certainly something to be said for future proofing.
Yea I鈥檓 good switching to v3 api for this, that鈥檚 why the api version segment was added to that request builder so we could set per request. I think the only real benefit with v4 for Radarr purpose is one can interact with private lists which we don鈥檛 support yet anyway (and maybe the speed bit, which doesn鈥檛 matter if we have to make 500 requests!). https://developers.themoviedb.org/3/lists/v4-or-v3-lists