Служба підтримки The Movie Database

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

3 відповідей (на сторінці 1 із 1)

Jump to last post

Yes, the flip flopping dates is a known bug. I haven't found time to fix it yet but it's on my radar.

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.

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?

Не вдалося знайти фільм або серіал? Увійдіть, щоб додати.

Загальні

s відкрити панель пошуку
p відкрити меню профілю
esc закрити відкрите вікно
? відкрити вікно з гарячими клавішами

На сторінках медіа

b повернутися назад
e перейти до сторінки редагування

На сторінках сезонів шоу

(стрілка вправо) перейти до наступного сезону
(стрілка вліво) перейти до попереднього сезону

На сторінках серій шоу

(стрілка вправо) перейти до наступної серії
(стрілка вліво) перейти до попередньої серії

На всіх сторінках зображень

a відкрити вікно додавання зображення

На всіх сторінках редагування

t відкрити перемикач перекладів
ctrl+ s підтвердити форму

На сторінках обговорення

n створити нове обговорення
w змінити статус стеження
p перемикач публічно/приватно
c перемикач відкрито/закрито
a відкрити активність
r відповісти на обговорення
l перейти до останньої відповіді
ctrl+ enter підтвердити повідомлення
(стрілка вправо) наступна сторінка
(стрілка вліво) попередня сторінка

Налаштування

Хочете оцінити чи додати до списку?

Увійти

Немає облікового запису?

Приєднайтеся до спільноти