The Movie Database 支持

I tried to make the following request

https://api.themoviedb.org/3/discover/movie?api_key=myapikey&with_runtime.lte=10

Which should give me movies that are no longer than 10 minutes. The request however does include movies that are longer than that.

For example the first movie in the results is:

{
  "popularity": 197.528,
  "vote_count": 178,
  "video": false,
  "poster_path": "/fapXd3v9qTcNBTm39ZC4KUVQDNf.jpg",
  "id": 423204,
  "adult": false,
  "backdrop_path": "/k2WyDw2NTUIWnuEs5gT7wgrCQg6.jpg",
  "original_language": "en",
  "original_title": "Angel Has Fallen",
  "genre_ids": [
    28
  ],
  "title": "Angel Has Fallen",
  "vote_average": 5.9,
  "overview": "Secret Service Agent Mike Banning is framed for the attempted assassination of the President and must evade his own agency and the FBI as he tries to uncover the real threat.",
  "release_date": "2019-08-23"
}

Which is 2h 1m.

Please correct me if I'm not using the with_runtime parameter properly.

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

Jump to last post

Hi @guy6767,

You can see here, that someone added a runtime of 2. That would be why it's being returned.

I've updated the value, is it still being returned?

It's not being returned anymore.

However this also happens to about 90% of the movies that are being returned. The thing is, when I'm using the /movie/{movie_id} request, the runtime is correct.

For example, the first result for discover/movie?api_key=myapikey&with_runtime.lte=45 is:

{
"popularity": 36.064,
"vote_count": 422,
"video": false,
"poster_path": "/wwnkDdJo87p7RVBPH18DmsWTUxE.jpg",
"id": 502416,
"adult": false,
"backdrop_path": "/mBOv5YrX5QGr5CusK0PKSHuxOt9.jpg",
"original_language": "en",
"original_title": "Ma",
...
}

So for the runtime I request https://api.themoviedb.org/3/movie/502416?api_key=myapikey, and I'm getting:

{
....
"original_language": "en",
"original_title": "Ma",
...
"id": 3172,
...
"runtime": 99,
...
}

Is there anyway to ensure that the "with_runtime.lte" parameter uses the same runtime I'm getting from /movie/{movie_id}?

Is there anyway to ensure that the "with_runtime.lte" parameter uses the same runtime I'm getting from /movie/{movie_id}?

Not currently, no. Runtimes can be added to each translation, and all of these values get queried when you run a discover request with with_runtime.lte.

You can see Ma, has the same issue as Angel Has Fallen: https://www.themoviedb.org/movie/502416-ma/changes?filter_key=key&filter=runtime

I see, thanks for the detailed reply.

No worries. I've gone ahead and corrected the pt-BR translation for Ma, which should remove it. If you come across more, you can make these edits yourself, or use the "Report" button on each movie and submit a report to have a moderator look at them. This helps everybody out. wink

Hi Travis,

We encountered the same problem... We implemented filters for the discover list in our app and had to realize the way the with_runtime.lte/gte parameters work, isn't a really reliable way to get movies within a specific runtime range. About 7 of 10 movies on page 1 of our discover response had actually another runtime that the one we specified with the with_runtime.lte/gte parameters. This may be owed to incorrect data provided by some contributors, but I don't think we have the capacities to fix this problem by finding and editing every incorrect runtime data existing in the database.

Could you please consider adding a parameter like local_runtime.lte/gte which only uses the local runtimes (and maybe as a fallback the original runtimes)?

If that's not possible: Do you know another method how we can filter out the "incorrect" movies afterwards? The request won't respond the movie runtime for the requested region, which could help us reach that target.

Best greetings and thanks in advance, Lukas

Adding a param like local_runtime.lte/gte is not something I have plans for right now. But there is something I can add when users add vastly different runtimes compared to what else has been entered, in hopes to catch the error when it's added.

In order to fix the bad entries right now, we'll just have to find them and get them fixed. I'm currently rebuilding TMDb's discover experience so it's something that I will probably be looking at in order to get it launched.

Here's the relevant ticket to improve the editing workflow. When I get to this ticket, I can probably also remove the seemingly erroneous values.

Thank you for the quick response! I'm glad that you're up to the problem. Nevertheless, I would like to share a few more thoughts with you (hoping not to annoy you):

Preventing incorrect information from being created would definitely be an effective step. But this handling could collide with "legit" differing runtimes (e.g. "The Shining" with an US Cut of 143 minutes and Kubrick cutting the movie to 119 minutes for several european countries... both cinema releases). Some "legit" differing runtimes could also be deleted by mistake if try to clean those incorrect runtimes in the database.

Let's image every runtime in the database is cleaned up and 100% correct: Why would a user (for example from Sweden) want to get suggested "The Shining" after filtering the discover function ( region=SE, language=sv-SE, with_runtime.gte=140 ) for runtimes longer than 140 minutes?

What's the usecase for this kind of with_runtime.lte/gte behavior considering every kind of runtime?

It's July 2022 and it still hasn't been addressed.

@chylinski said:
It's July 2022 and it still hasn't been addressed.

If you're referring to the feature that admin Travis Bell reported in 2019 that he intended to implement,
I believe the feature has been implemented.
Look here
https://trello.com/c/EffmZsoj/180-throw-a-warning-when-the-entered-runtime-is-vastly-different-than-the-average

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

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区