Add TMDB APIs for Movie & Series. Fixes #72
Initially created combined API but moved to separate TMDBSeriesAPI and TMDBMovieAPI because TMDB APIs include the type in the URL. Not super thrilled about this, but it works.
Using one TMDBAPI class for both series & movie:
-
searchByTitleis workable with search multi - Would need to modify
queryDetailedInfoByIdandgetByIdto include type. - 'Create Media DB entry by id' command won't work without getting the type somehow.
Notes:
- TMDB "API Key" is used, not "API Read Access Token" - unsure if this is clear enough.
- Trimmed casts to first 5
- Unsure how to format
StreamingServicesbut this is available. Requires attribution, however. - #196: Country is available as
origin_country,original_language, orproduction_countries - Using 780w images.
originalis available for larger images, but can impact performance in bases & dataview.
Series notes:
- The series level runtime field is deprecated (in favor of per season/episode runtimes), but many shows still have this. Many series have multiple runtimes - just grabbing the first.
- Using
production_companies(MGM Television, Double Secret Productions) forstudiobut this could also benetworks(Showtime, Syfy) - Including
credits, which on TMDB is for the latest season. Could swap toaggregate_credits - #196: Content Rating is available per location.
- I'd like to have a field for
next_air_datebut I can see this being very quickly (weekly, even daily) outdated. I'll just track this manually for my own usecase.
Movie notes:
- #196: Content Rating is avaiable per location & release. Box office stats not available.
@mProjectsCode Hi, just started to use your plugin today and I love it, I was wondering however when the TMDB integration is planned to go into production since it has been idle in the TMDB branch for quite some time now?
Hopefully I've rebased properly against master! I had to add @ts-ignore to the setCloseCallback functions in src/modals to get the build working.
Never worked with openapi schemas before, so no clue if I've done this properly. Mostly just copied from the GiantBomb implementation.
I was unable to get the headers to pass through with obsidianFetch and requests didn't show up in devtools either.
TMDB's apis allow you to append_to_response instead of making another request for related data. This is an allowed query parameter in their schema, but the types don't seem to account for it? I've @ts-ignore'd those.