Suporte do The Movie Database

Hi,

I can't seem to find how to get the next episode for the show. For example Arrow (ID: 1412),

How do I get this data via API: Next Episode: The Secret Origin of Felicity Smoak (season 3, episode 5) airs tomorrow!

Thanks.

3 respostas (na página 1 de 1)

Jump to last post

Hi Rejanu,

While it's true we don't provide a specific field for this, getting this info from API should be pretty easy.

Similar to what we're doing on the website, you could first check the status of a TV show, and if it's not "Canceled" or "Ended", check the last season and calculate the next episode to air based on the current time and date. Right now, you could get this with 2 requests:

https://api.themoviedb.org/3/tv/57243?api_key=###
https://api.themoviedb.org/3/tv/57243/season/8?api_key=###

With the season details pulled down, you can calculate the offset and figure out that episode 12 is next.

What if a season is over? it would take more than a week to the next episode, there we cannot calculate the next episode date, or is there something i'm missing? sorry if i'm asking some nonsense.

Hi.

I am newcomer here and also not sure if this is what you are asking, but if you know the season and the episode that are currently out, then

1) Call the https://api.themoviedb.org/3/tv/57243?api_key=### . 2) Take the required (i.e. the one that has a relevant season number) season json from the responseJson['seasons'] 3) Compare the requiredSeasonJson['episode_count'] with the episode that is currently out. If they match, then the season has finished.

Hopefully that helps :)

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