Podpora 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 replies (on page 1 of 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

Ne najdete filma ali serije? Prijavite se, da ga/jo ustvarite.

Povsod

s aktiviraj iskalno vrstico
p odpri meni profila
esc zapri odprto okno
? odpri okno za bližnjice

Na predstavnostnih straneh

b pojdi nazaj (ali na starša, kjer je smiselno)
e pojdi na urejanje strani

Na straneh sezon serij

(desna puščica) pojdi na naslednjo sezono
(leva puščica) pojdi na prejšnjo sezono

Na straneh epizod serij

(desna puščica) pojdi na naslednjo epizodo
(leva puščica) pojdi na prejšnjo epizodo

Na vseh slikovnih straneh

a odpri okno za dodajanje slike

Na vseh urejevalnih straneh

t odpri izbirnik prevodov
ctrl+ s pošlji obrazec

Na straneh za razpravo

n ustvari novo razpravo
w preklopi gledalski status
p preklopi javno/zasebno
c preklopi zaprto/odprto
a odpri aktivnost
r odgovori na razpravo
l pojdi na zadnji odgovor
ctrl+ enter objavi sporočilo
(desna puščica) naslednja stran
(leva puščica) prejšnja stran

Settings

Want to rate or add this item to a list?

Prijava