The Movie Database 支持

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?

2 回复(第 1 页,共 1 页)

Jump to last post

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).

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.

找不到电影或节目?登录并创建它吧。

全站通用

s 聚焦到搜索栏
p 打开个人资料菜单
esc 关闭打开的窗口
? 打开键盘快捷键窗口

在媒体页面

b 返回(或返回上级)
e 进入编辑页面

在电视季页面

(右箭头)下一季
(左箭头)前一季

在电视集页面

(右箭头)下一集
(左箭头)上一集

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

t 打开翻译选择器
ctrl+ s 提交

在讨论页面

n 创建新讨论
w 切换关注状态
p 设为公开 / 私密讨论
c 关闭 / 开放讨论
a 打开活动页
r 回复讨论
l 跳转至最新回复
ctrl+ enter 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区