The Movie Database 支持

in the movie detail api, if I pass the imdb id in the id parameter, it gives me correct information. but if i do the same with the tv api, it says it didn't find anything.

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

Jump to last post

Can you give us an example of the API query that doesn't work?

@dhiogoacioli said:

in the movie detail api, if I pass the imdb id in the id parameter, it gives me correct information. but if i do the same with the tv api, it says it didn't find anything.

This is only working for movies. /movie/{movie_id} is working with the IMDB Id (but is undocumented), but /tv/{tv_id} is not.

You need to use /find/{external_id} to always get a result.

@superboy97 said:

@dhiogoacioli said:

in the movie detail api, if I pass the imdb id in the id parameter, it gives me correct information. but if i do the same with the tv api, it says it didn't find anything.

This is only working for movies. /movie/{movie_id} is working with the IMDB Id (but is undocumented), but /tv/{tv_id} is not.

You need to use /find/{external_id} to always get a result.

yeah, i know about this. but wouldn't it be better if I just make one api call instead of two?

As indicated in my previous answer, this is normal.

as the structure of the two apis are very similar, I believe it would be a simple improvement to be made.

There is a big difference:

  • For movies, there is only one type of external Id : the IMDB Id, that can be easily differentiate from a TMDB Id.

  • For TV shows, there are multiple external Id types: IMDB Id, TVDB Id, ... and so on... Some of them can't be differentiate from a TMDB Id.

well, I don't know the other types, but does the imdb id always start with tt?

@dhiogoacioli said:

well, I don't know the other types, but does the imdb id always start with tt?

Yes, but we can't give a privilege to one type of external Id against the others, especially for an undocumented feature, which can be removed at any time.

well, it could have different parameters for different ids. I'm just thinking on the server side, the fewer calls you have, the better.

The correct usage of the API is by using find for the external Ids.

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

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区