The Movie Database 支持

I have a somewhat newbie question. Can you please confirm that ids for movies do not change, essentially a primary key? So whilst all other data for a given resource might change, original title etc. the id is a unique and persistent identifier and does not get assigned to another resource of the same type?

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

Jump to last post

Movie ids do not ever change nor are deleted ids reused. IDs are also only unique within their own namespace meaning there can be an id 1499 in both movies and TV shows.

As a point of reference for our ids, you can grab the daily ID exports which contain all of the valid ids.

Cheers.

Perfect. Thanks for the quick response and yes I'm working with the daily exports.

ok_hand_tone2

I have a problem. Like the id didn't change, but as it seems, the movie was removed and new item appeared. To be specific, there was movie with the id "475105" and the title "Hans Zimmer: Live in Prague". Now this "is changed" to id "435011" and title "Hans Zimmer Live in Prague". Notice, that the colon from the title is missing. And now, this url https://www.themoviedb.org/movie/475105-hans-zimmer-live-in-prague gives 404. For me it seems as the id was changed, or what can be the issue with that?

We have duplicates that are added and removed all the time. 475105 looks like it was a duplicate that was removed.

Thanks for the quick reply. I then take that into account for future development.

Hi, I've just stumbled across this problem. With a movie: D-Day (612831) & (609670). Is there anyway of identifying the movies that are removed? Or would it be possible to create a 302 redirect or pointer to the new movie?

I've just been scratching my head over an issue where a script I was running was crashing out, definitely my poor coding stuck_out_tongue , because the movie couldn't be found. I've updated the ID of that movie now and I'm expecting it will all just work.

Cheers

It appears there is a section in the Documentation called 'changes' - (API-Changes. I'm sure this can be checked before running scripts

@POOKER said:
It appears there is a section in the Documentation called 'changes' - (API-Changes. I'm sure this can be checked before running scripts

I think it might be better to get the list of valid IDs.
Daily the list is exported.
https://developers.themoviedb.org/3/getting-started/daily-file-exports

找不到电影或剧集?登录并创建它吧。

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区