I don't see any id explicitly saying whether a listing is a movie or a tv show but there are some differences for example movies use release_date and tv uses first_air_date. Can I rely on this being true throughout the database and use this as a way to filter what is a movie and what is a tv show? Or is there an easier way that I'm missing?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on April 4, 2022 at 10:07 PM
Hi @jgreen, if the result came from a multi search or a find request (or anything else with mixed media types eg. trending) it will have a
media_type
field delivered as part of the object. Otherwise, you will know it's a movie or TV based on how you retrieved it (ie. a movie search, or a TV discover).Reply by jgreen
on April 5, 2022 at 12:40 PM
Hey Travis appreciate the help.
I'm dealing with a dynamic page that could potentially be passed results from multiple requests (trending/all list, popular tv, popular movie) and rather than going through the request process again I'd like to filter the results that have already been fetched (and don't have a media_type) and use the id data from those results for another fetch like get videos to grab a trailer for whatever show was clicked on which requires a different request link depending on if it's a movie or tv show.
I can filter those results from properties release_date and first_air_date which the former seems to only be used for movies and the latter for tv shows but not sure how reliable that would be long term.
Good to know that multi search has the media_type property.