Hi,
If you make the following call, you will see that "Guardians of the Galaxy" is in the wrong place.
https://api.themoviedb.org/3/discover/movie?api_key=APIKEY&language=en-US&with_companies=420&sort_by=release_date.desc&include_adult=false&include_video=false&page=1
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 ticao2 š§š· pt-BR
on May 21, 2020 at 10:30 AM
As I am not a fan of these films, so I need more help to understand the problem.
The mistake is obvious to you. But for me it is a mystery.
In what position should the film appear?
The expected opening date is 2023-02-17.
Which film should appear in the first position?
Reply by sereisoglu
on May 21, 2020 at 10:37 AM
I made the request as "sort_by = release_date.desc".
.
.
.
Marvel Studios: Expanding the Universe -> 2019-11-12
Guardians of the Galaxy -> 2014-07-30
Peter's To-Do List -> 2019-09-17
.
.
.
The name of the movie is "Guardians of the Galaxy", not "Guardians of the Galaxy Vol. 3".
Reply by Travis Bell
on May 21, 2020 at 10:46 AM
Unless a
region
is specified, arelease_date.desc
sort by option will sort by the newest release date that has been added to the movie (release_date.asc
sorting on the earliest of course). You can see here that Sweden has some physical releases added. Also, without aregion
, the default display date is the primary release date, hence it showing2014-07-30
.Will force a query to the US release dates, not only showing you the correct display date but also forcing the data to sort on the proper regional release date.
Reply by ticao2 š§š· pt-BR
on May 21, 2020 at 10:57 AM
OK. Understand.
This film has the following Release date:
And you used the &sort_by=release_date.desc parameter.
And this Swedish date is a release_date.
I believe that if you use the &sort_by=primary_release_date.desc parameter, then only the global premiere dates will be considered.
Other dates, such as relaunching or launching Bluray will be discarded.
Try using &sort_by=primary_release_date.desc
EDIT
Ooops! It seems that Travis Bell has already given the solution. :-)