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
Не вдалося знайти фільм або серіал? Увійдіть, щоб додати.
Хочете оцінити чи додати до списку?
Немає облікового запису?
Відповідь від Travis Bell
12 липня 2017, 12:27
Yes, the flip flopping dates is a known bug. I haven't found time to fix it yet but it's on my radar.
Відповідь від SebastianCrow
12 липня 2017, 12:37
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.
Відповідь від Zsolt Bertalan
25 жовтня 2024, 03:47
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?