Sprijin Bază de date filme (The Movie Database)

Hello everyone I have a question regarding some functionality that I want to add to my iOS app. I am mostly a frontend guy and therefore any help would be appreciated.

Right now, I have a textbox where I can enter a name of a movie, or an actor, etc. and it will display a table view list with all the matches.

I am doing that by accessing directly the TMDB API search.

That works fine, however, it takes a few seconds to complete which makes total sense.

I want to be able to have some autocomplete on my text field when I start typing in it. I know that this is not possible since it needs a few seconds each time to get any results. Do you guys know if there is a way of doing that? Can I somehow get ALL the movies from the TMDB database? Is this data going to be TOO much to store it locally?

Thanks

Dimitris

6 răspunsuri (pe pagina 1 din 1)

Jump to last post

Hi Dimitris,

Our search methods support autocomplete already, you'll notice if you fire off partial search requests you get matches. In fact, the website search here on TMDb is just making straight API requests.

It should be very performant but you will always have the network latency to worry about depending on where you're located. For me it's pretty fast (I'm in Canada, the API is ran on servers in the U.S.), you can see it in action here. That is literally our autocomplete search here on the website making /search/multi requests.

You'll notice the first request is a little longer (300ms) because it's spending time connecting and doing all the SSL handshake stuff. Since we support keep alive though, every request after that is super fast (~75ms).

So, with regards to speed this will have the most to do with network latency than anything else. Depending on where you're located, if you want to shorten the network latency, you would have to store and cache the data locally on a server closer to you. Caching the data is fine, but yes, that's what you would have to do.

Thank you for quick response.

I am kind of confused about some details. first of all, what do you mean you support autocomplete? do you mean that speedwise you can support it?

Also, I am in the US and I have noticed that it takes around 10 sec to get the movies. I think this is too long and I am pretty sure that it doesnt have to do anything with the app itself.

I am also requesting the images which I guess might take more time. This is the url for search "https://api.themoviedb.org/3/search/movie?api_key=" where i input the query with the name of the movie after the key.

I cant understand what might be taking so long.

Is there any example or something? Sorry for all these questions

Hi,

Travis would you please put some example ? :)

https://api.themoviedb.org/3/search/multi?api_key=####&language=en-US&query=avatar&page=1&include_adult=false

@zabkas said:

https://api.themoviedb.org/3/search/multi?api_key=####&language=en-US&query=avatar&page=1&include_adult=false

Does this method work for auto-suggesting URL when adding it to Vivaldi? I have generated an API key and tried it but that did not work.

My suggest URL was: https://api.themoviedb.org/3/search/multi?api_key={redacted}&language=en-US&query=avatar&page=1&include_adult=false

https://imgur.com/iBlaUgU

@swkazashi@outlook.com Can you create a new thread please? I don't know the answer to your question but this thread has nothing to do with Vivaldi.

Thanks!

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

Globale

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

Pe paginile media

b mergi înapoi (sau la părinte atunci când este cazul)
e mergi la pagina de editare

Pe paginile sezoanelor filmelor seriale

(săgeată dreapta) mergi la sezonul următor
(săgeată stânga) mergi la sezonul precedent

Pe paginile episoadelor filmelor seriale

(săgeată dreapta) mergi la episodul următor
(săgeată stânga) mergi la episodul precedent

Pe toate paginile de imagini

a deschide fereastra pentru adăugarea de imagini

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimite formularul

Pe paginile de discuții

n crează o discuție nouă
w comută starea de vizionare
p comută publică/privată
c comută închisă/deschisă
a deschide activitatea
r răspunde la discuție
l mergi la ultimul răspuns
ctrl+ enter trimite mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina precedentă

Setări

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

Autentificare