Sprijin Bază de date filme (The Movie Database)

I know movies date aren’t confirmed too far in advanced, but in my app I have an unpcoming tab that shows the movies coming out in the next year. Right now when people search they get confused why they are seeing movies from pervious years.

What I was thinking it if the search had a greater than release year option that would return all movies that at least have that known release year in the system I could filter it that way.

I attempted to use discover with the greater than date and keyword but couldn’t get the results I needed return.

If there is another possible way to do this that I am missing please let me know.

5 răspunsuri (pe pagină 1 din 1)

Jump to last post

Since you did not post which API Request you used, then I assume you used the release_date.gte parameter and not the primary_release_date.gte parameter.

There is this API Request.
https://developers.themoviedb.org/3/movies/get-upcoming
https://api.themoviedb.org/3/movie/upcoming?api_key=THE_KEY&language=pt-BR&page=1&region=BR

Or you can build an API Request.
In Discover and using the & primary_release_date.gte parameter.
https://developers.themoviedb.org/3/discover/movie-discover
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&region=BR&sort_by=primary_release_date.desc&page=1&primary_release_date.gte=2020-06-01


EDIT
Of course, use your Language and your Region.
And the parameter & primary_release_date.gte, I always suggest using the date of a Monday of the current week.
Thus, those that will Premiered on Friday or the weekend will be on the list.

So Ticao, main issue isn’t show upcoming movie it is when trying to search only upcoming movies

Example:

I know the new Guardians of the Galaxy 3 movie has a year at least (not sure if that has changed with all the COVID-19) So in my upcoming section of the app I would love if they searched guardians of the galaxy it would just return that one rather then all the others.

that’s the issue I am talking about needing a way to solve.

Please, if it is not too difficult, post the API Request being made here.
If you do NOT want to receive films that have premiered in the past, you need to determine that the primary_release_date is not less than today.
It must be bigger than today.
But I don't know what the Requisition you are doing.
If you can post here the Request you are making, it will be much easier to provide a solution.
Please post here the API Request being made.

The problem is I can’t find a way to do what I want.

So what I’d love to do would be something like this

https://api.themoviedb.org/3/search/company?api_key=<<api_key>>&query=Guardians&release_year.gte=2020&page=1

OR

https://api.themoviedb.org/3/discover/movie?api_key=<<api_key>>&language=en-US&sort_by=popularity.desc&include_adult=false&include_video=false&page=1&title_contains=Guardians&release_year.gte=2020

I need a way to limit the result of a call to great than or equal to a release year and have the ability and search the title.

Discover does not have a Title filter.
Search does not have a & release_year.gte filter.
Only has year or primary_release_year.
As you said in your first comment:

in my app I have an unpcoming tab that shows the movies coming out in the next year.
Right now when people search they get confused why they are seeing movies from pervious years.

Next year, that is 2021.
So the API Request using Search would look like this:

https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&language=en-US&query=Guardians&page=1&primary_release_year=2021  

Using primary we are limiting the official premiere year in the theaters.
That year that appears in parentheses, next to the film title.
If you don't use primary then even the commemorative Bluray releases, made 30 years later, may appear.

But in 2021 there is no preview of any film that has the expression Guardians in its title.
So the answer is zero.
To meet your need, requests must be made for each of the next years, 2022 and 2023.

https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&language=en-US&query=Guardians&page=1&primary_release_year=2022  
https://api.themoviedb.org/3/search/movie?api_key=THE_KEY&language=en-US&query=Guardians&page=1&primary_release_year=2023  

We only have results in 2023.
I can't think of any other solution.
Maybe Travis Bell can come up with another idea.


EDIT
Another possibility is to use Discovery.
Search for all Movies that will premiere after a certain date, or within a period of time.

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=en-US&sort_by=primary_release_date.asc&page=1&primary_release_date.gte=2021-01-01&primary_release_date.lte=2023-12-31  

Then, in your APP's programming, filter this result by title that contains the expression Guardians.

Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.

Global

s focalizați bara de căutare
p deschideți meniul profilului
esc închide o fereastră deschisă
? deschideți fereastra de scurtături de la tastatură

Pe paginile media

b înapoi (sau la pornire atunci când este cazul)
e accesați pagina de editare

Pe paginile sezonului TV

(săgeată dreapta) mergeți la sezonul următor
(săgeată stânga) mergeți la sezonul precedent

Pe paginile episoadelor TV

(săgeată dreapta) mergeți la următorul episod
(săgeată stânga) mergeți la episodul anterior

Pe toate paginile de imagini

a deschideți fereastra pentru adăugarea imaginii

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimiteți formularul

Pe paginile de discuții

n creați o nouă discuție
w comutați stare de vizionare
p comutați public/privat
c comutați închidere/deschidere
a deschide activitatea
r răspuns la discuție
l mergeți la ultimul răspuns
ctrl+ enter trimiteți mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina anterioară

Setări

Doriți să evaluați sau să adăugați acest element într-o listă?

Autentificare