Suporte do 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 resposta (na 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.

Não consegue encontrar um certo filme ou série? Inicie sessão e adicione-o.

Geral

s focus the search bar
p abrir menu do perfil
esc close an open window
? open keyboard shortcut window

Em páginas de Média

b go back (or to parent when applicable)
e ir para a página de edição

Em páginas de temporadas de séries

(seta para a direita) ir para a próxima temporada
(seta para a esquerda) ir para a temporada anterior

Em Páginas de Episódios de Séries

(seta para a direita) ir para o próximo episódio
(seta para a esquerda) ir para o episódio anterior

Em Todas as Páginas de Imagens

a abrir janela para adicionar imagem

Em Todas as Páginas de Edição

t open translation selector
ctrl+ s submit form

Em Páginas de Discussão

n criar uma nova discussão
w toggle watching status
p toggle public/private
c toggle close/open
a abrir actividade
r reply to discussion
l ir para a última resposta
ctrl+ enter submit your message
(seta para a direita) página seguinte
(seta para a esquerda) página anterior

Definições

Deseja classificar ou adicionar este item a uma lista?

Iniciar Sessão

Ainda não é um membro?

Crie uma Conta e Adere a Comunidade