Soporte de The Movie Database

Hi! I'm using the TMDB API to build a small application. I use the /search/movie endpoint to list movies. While implementing paging I noticed that multiple pages can apparently contain the same entry. As an example, at time of testing:

https://api.themoviedb.org/3/search/movie?query=Star Wars&include_adult=false&language=en-US&page=7
https://api.themoviedb.org/3/search/movie?query=Star Wars&include_adult=false&language=en-US&page=8

Page 7 and 8 both contain the entries "The Making of Star Wars Attack of the Clones" (id: 1152956) and "Star Fleet: The Thalian Space Wars" (id: 584907).

When I make the same queries with include_adult=true, I don't (seem to) get duplicate entries.

I don't know much about backend/db querying but I believe the filtering of adult entries is done at the wrong point in the data flow, which causes duplicate entries in separate pages.

1 respuesta (en la página 1 de 1)

Jump to last post

You're just running into the cache. Some previous pages were already cached but then when our nightly re-index runs (which will change the popularity) and as pages expire, the data returned can be in a different order.

By using a new parameter (include_adult) you're going to run into fewer pages that have been cached.

Bottom line though, we make no guarantees about the order of the items returned in search and discover. Requests can be cache. It's best to just grab the data from the pages you're interested in and then de-duping the data locally on your end.

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión