Supporto The Movie Database

Hi,

I would like to store the credits for each episode but want to do this as efficiently as possible and not be burdensome to the API servers. Is it correct that to get the credits for an episode, you need to call the TV Episode end point (/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/credits) ? Is there an alternative to retrieve this information or a way to retrieve the credits for multiple episodes in one call? I am hoping that there is another option that would help to avoid the individual episode credit calls to cut down on the traffic and server side resources.

Thanks in advance,

zbd

2 risposte (nella pagina 1 di 1)

Jump to last post

You have to iterate through all the episodes. If you want to add the regular season cast to these episodes, you must also iterate through all seasons and manually merge the regular cast (season level) and guest stars (episode level) for each episode.

The TMDB API allows 50 queries per second, so you can write your code multithreaded to speed things up. Just use some sort of request rate limiter and handle HTTP Error 429 (Too many requests).

Also be aware that the TMDB API Terms of Use only allow you to cache TMDB data locally for a maximum of 6 months.

I am doing pretty much what you describe, so I will continue on with that approach. I have the API rate limiting set at 39 calls per second (rolling window) to make sure I stay under 40 per second. I thought the limit was 40 but if I can set it to 50 that will help cut the time a bit.

With respect to caching, I think I should be okay. I am running processes to check the recent changes api and when found, I refresh the data if it is still available and purge if not. I am also running a periodic pull of the id files and doing a full refresh overwriting old data. This process will purge any data that is local but not in the id files so that I don't hold stale data.

If this doesn't stay within the bounds of the terms of use, please let me know. Any suggestions on how to correct would be greatly appreciated, too.

Thank you for the assistance, zbd

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi