I am retrieving all results sorting by popularity using the discover movie end for each page and concatenating them for all pages in subsequent order like this:
allResults += response.json()['results']
However, when I look at
allResults
the ordering is not quite respected. It is for the most part, but then I see a 2.0 after a 0.6, and similar instances. What could be the cause of this? Thanks.
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 29 de julio de 2021 a las 10:25
The objects returned on lists like discover and search are cached and when it comes to popularity, only refreshed once a day. Other events can however trigger items to get refreshed in the discover service and that happens outside of what data is actually returned in the response.
Short(er) reply, we make no guarantees that the data returned is 100% fresh and in sync. This is just the nature of the service given there is multiple layers of cached data being returned.
Contestado por BuBanGo
el 29 de julio de 2021 a las 10:31
Thanks, that makes sense. I can sort the values a posteriori.