Suporte do The Movie Database

after search around the forum, I suppose the total results number is set to 20 per page, but in some queries, like discover/movie, it's not always the case, some times, the first page returns only 19 results, sometimes 9 results, but the second page returns always 20 results. I have to force query starting at page 2 to avoid this variation.

is this a bug ? or it's intentional ? can I force the page returns always 20 results ? (in case their are more than 1 page)

thanks a lot

4 respostas (na página 1 de 1)

Jump to last post

A few things to mention so I can get a clearer picture here:

  1. Each page is cached and it's possible that new data has been updated since the time of the original cache leading to either wrong counts and/or additional pages
  2. In those cases when you're checking the second page, are there results? Technically you can request any page you want, but that doesn't necessarily mean there will be results

when i check the second page, there are always results, and the results length is 20. but the first page is not. for example:

  http://api.themoviedb.org/3/discover/movie?page=1&with_genres=28

returns only 19 results, but

 http://api.themoviedb.org/3/discover/movie?page=2&with_genres=28

returns 20 results

http://api.themoviedb.org/3/discover/movie?page=1

returns only 9 results, but

http://api.themoviedb.org/3/discover/movie?page=2

returns 20 results.

Ya, this is a combination of a few things that I'm aware. I've created a new ticket to look at this in the future.

Easy fix for you should be to trust the total_pages field, ignore the number of items being returned in results array.

thanks for your quick reply. much appreciate your help ^

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