Soporte de 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 respuestas (en la página 1 de 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

¿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