Hi! After last update, I realise that my results using the "discovery" method got weird results Take a look:
http://api.themoviedb.org/3/discover/movie?api_key=XXXXX&vote_count.gte=10&sort_by=release_date.desc
{"adult":false,"backdrop_path":"/vkSD3JjyW7XKuK4z88mhPgqD2k1.jpg","id":229407,"original_title":"Puppy","release_date":"2013-12-10","poster_path":"/maBSw4YgUzjQoowiMI51FG0Npzc.jpg","popularity":0.36656922222498,"title":"Puppy","vote_average":8.4,"vote_count":24},
{"adult":false,"backdrop_path":"/uNa5sbuoVvXFIdVo0De2HJrrxOd.jpg","id":227156,"original_title":"The Giver","release_date":"2014-08-15","poster_path":"/pBId6jhii1vP2CShtrGLB3SuKhc.jpg","popularity":9.03227783839263,"title":"The Giver","vote_average":6.8,"vote_count":78}, ...
It is sorting the date release in a random way... Am I doing something wrong?
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 14 de octubre de 2014 a las 09:21
Hi iblop,
I can see this happening as well. I'm not 100% sure yet, but will look into it. Thanks for the report.
Contestado por hosam
el 15 de octubre de 2014 a las 17:16
yeah this broken our entire genres view
Here is one example query we make https://api.themoviedb.org/3/discover/movie?api_key=&with_genres=28&language=en&page=1&vote_count.gte=5&sort_by=release_date.desc
Contestado por Travis Bell
el 15 de octubre de 2014 a las 18:51
The fix for this has been pushed live, it will take a few hours for any cached requests to expire (so you won't necessarily see any difference right away).
P.S.
/discover/movie
got a decent little upgrade today, I'd suggest taking a look over at the docs for more info. One in particular is a new sort option forprimary_release_date
which I know a lot of people wanted.Contestado por Travis Bell
el 16 de octubre de 2014 a las 10:57
@hosam in reply to this tweet: http://twitter.com/TodoMoviesApp/status/522757720844554240
I am seeing different pages with these queries:
As I mentioned, you'll have to wait for cached items to expire, it's possible you're still running into some cached results.
Contestado por iblop
el 17 de octubre de 2014 a las 08:48
Thx for the reply and the fix! I will check as soon as possible :)
Contestado por Matt
el 17 de octubre de 2014 a las 20:31
I can't decided if I'm hijacking this thread or not, but it seems related, so I'm going to take a chance and post it here: Was the sort by title not working recently too, or possibly just an issue with the API docs? I updated an app from the old API version to v3 a few weeks ago (roughly) and I swear the documentation did not list title as a possible sort option. It seems to be working now (though some of the results seem odd to me, which I will inspect further and possibly post a new thread).
Contestado por Travis Bell
el 17 de octubre de 2014 a las 22:16
Hey Matt,
That would be because it just got added 2 days ago ;) You can read the announcement post here.
With regards to sorting by
original_title
, keep in mind that, that is exactly what it is. The results are not sorted by the translated title. We are stripping “the” out of the beginning of strings but I believe that’s about it.Looks pretty good to me...
Contestado por Matt
el 17 de octubre de 2014 a las 23:21
Oh, well good timing then since I am hoping to publish the updated app in the next few days. I saw that announcement but didn't notice the date, and I couldn't tell from what I read which ones were new. Thanks for the info. I'll double-check what I'm seeing in my app and make sure I'm not seeing a bug. Should I be preferring original_title over title?
Contestado por hosam
el 18 de octubre de 2014 a las 07:26
Hey Travis,
It is still broken
The query you pasted above http://api.themoviedb.org/3/discover/movie api_key=##&vote_count.gte=5&sort_by=release_date.dsc&with_genres=18&page=1
Expected Result: Return movies sorted by the release date New to Old.
Actual Results: Randomly sorted movies. First result is Jump In! with release date 2007 and second is Choke with 2008
That problem is in all other categories as well. The results aren't returned sorted by the date.
Contestado por Travis Bell
el 18 de octubre de 2014 a las 10:03
You’re missing an
e
in yourrelease_date.desc
.Now, Black is being returned first because someone added a 2016 release to it, but I’m pretty sure that is wrong.
Reminder, using the new
sort_by=primary_release_date.desc
would have fixed this particular issue with Black but will generally provide better (expected results).Contestado por hosam
el 18 de octubre de 2014 a las 10:23
okay it seems that this mess happened because now you just pick the latest release date .
Obviously this will generate numerous bugs since many movies release date are off sometimes by more than one year for example https://www.themoviedb.org/movie/152795-the-congress/edit?active_nav_item=release_information
I guess I will have to switch to the primary date sorting but that won't fix it either because many movies don't have the primary date set either which won't help fix the issue.
The way currently sorting workings is incorrect. Sometimes you pick US date, sometimes, UK, IT,..etc there is no consistency like that for the sorting. Maybe make a parameter for the country used for sorting and if it doesn't exist then fall back to the primary release. Otherwise the current results returned are irrelevant to everyone around the world.
Contestado por Matt
el 18 de octubre de 2014 a las 10:26
I was just going to say, I tried primary_release_date and it seemed to fix the incorrect sorting. The following query always returns a movie with a release_date in 2006 as the first entry in this category:
Changing the sort to primary_release_date provides more consistent results. It still looks like a bug, since release_date is listed as a valid sort_by option.
Contestado por Travis Bell
el 18 de octubre de 2014 a las 10:36
Ok, I think I get where you’re coming from... this was never something that was consciously accounted for but sorting by release date should probably actually look at, what are we thinking here, the earliest release date of a movie? It’s got to be either earliest or latest. With this decided on, the behaviour can be changed.
If you take a look at the movie, it has a release for 2208 added to it. That’s why it’s first.
With the proposed change, it still wouldn’t change Matt’s query... Basilisk would still be included. But perhaps the order would be different if we look at the earliest release date instead.
Contestado por hosam
el 18 de octubre de 2014 a las 16:13
Yup. You need to pick the earliest release date for a movie and use that for both sorting Ascending and Descending. That way it will be more consistent and results should be more or less like before. That also will take care of those super weird anomalies that are like 1 year off.
In addition to that fix you can add a new parameter which accepts the country flag for sorting (if not available then fall back to earliest date). Then the users can actually get results relevant to their location.
Currently the API is returning a lot of incorrect sorting order which wasn't the case before. I do understand it wasn't optimal before but it was working to some extend and the users were pretty happy with it.
Contestado por Matt
el 18 de octubre de 2014 a las 16:19
It's definitely strange looking behavior, and for users that don't understand the why, it just looks wrong. When the search results are sorted by original title, which in many cases is in a foreign character set, so they show first when sorting descending, and the translated title is shown, they just look all out of order. I may just end up not showing anything where the original title does not match the translated title, but I'd prefer to be able to filter directly in the query to only return movies originally released in a particular country. Is that technically feasible? Are there cases where that is a bad user experience?