Hi guys,
in my application, I'm aiming to make the collection of movies with the total number of elements specified at the same beginning. It would mean that I need a reliable "total_results" field and paging requests.
However, I find the paging responses very unstable.
Let's check out an example of the "https://api.themoviedb.org/3/movie/now_playing?page=1&language=en"
Performing the same request one after another gives us the responses like:
"total_results":687,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":686,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":699,"dates":{"maximum":"2017-07-13","minimum":"2017-06-01"},"total_pages":35}
"total_results":686,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":686,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":686,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":686,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":686,"dates":{"maximum":"2017-07-19","minimum":"2017-06-07"},"total_pages":35}
"total_results":693,"dates":{"maximum":"2017-07-14","minimum":"2017-06-02"},"total_pages":35}
"total_results":693,"dates":{"maximum":"2017-07-14","minimum":"2017-06-02"},"total_pages":35}
Basically, a problem lies in a range of dates. It cannot be specified in the request and it's not deterministic which ones are picked.
The problem that rises here is that I cannot rely on the "total_results" received in the page=1 request in order to prepare a whole collection. Moreover, I also need to filter out the results to have them all unique (e.g. it always happen to me that after going through all the 35 pages, I need to filter out dozens of movies because they were actually fetched in one of the previous pages).
My desired result would be to have a deterministic "total_results" field and all results unique (I think this one would be achieved implicitly if I would have all the page responses with the same minimum and maximum date) :)
Is it a known issue or maybe I'm missing anything here? :)
Great thanks for your help!
Best regards
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on July 12, 2017 at 12:27 PM
Yes, the flip flopping dates is a known bug. I haven't found time to fix it yet but it's on my radar.
Reply by SebastianCrow
on July 12, 2017 at 12:37 PM
Sure, thanks for the quick response. I'll greatly appreciate a fix for this issue ;) I'll handle it on the frontend side for now.
Reply by Zsolt Bertalan
on October 25, 2024 at 3:47 AM
I believe this is still not fixed. And not sure what the workaround could be. At any given time there will be duplicated and missing movies, when they are swapped between pages, but one of the pages returns the cached version. The only solution I can imagine is the coordinated update of the pages. Or is there anything else I could do?