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.
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 September 4, 2019 at 10:31 AM
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?
Reply by guy6767
on September 4, 2019 at 12:25 PM
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:
So for the runtime I request https://api.themoviedb.org/3/movie/502416?api_key=myapikey, and I'm getting:
Is there anyway to ensure that the "with_runtime.lte" parameter uses the same runtime I'm getting from /movie/{movie_id}?
Reply by Travis Bell
on September 4, 2019 at 1:00 PM
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
Reply by guy6767
on September 5, 2019 at 7:16 AM
I see, thanks for the detailed reply.
Reply by Travis Bell
on September 5, 2019 at 10:41 AM
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.Reply by Ava Assistant - Movies & Shows
on November 4, 2019 at 11:12 AM
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
Reply by Travis Bell
on November 4, 2019 at 11:26 AM
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.
Reply by Ava Assistant - Movies & Shows
on November 4, 2019 at 3:08 PM
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?Reply by chylinski
on July 30, 2022 at 11:36 AM
It's July 2022 and it still hasn't been addressed.
Reply by ticao2 š§š· pt-BR
on July 30, 2022 at 8:24 PM
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