Sprijin Bază de date filme (The Movie Database)

The best way to explain this is with an example:

If you search for "disney", and request page 1, you will get:

{ "page":1, "results":[ 20 records ], "total_pages":6, "total_results":117 }

For pages 2 through 6, you get what you'd expect:

{ "page":2, "results":[ 20 records ], "total_pages":6, "total_results":117 }
{ "page":3, "results":[ 20 records ], "total_pages":6, "total_results":117 }
{ "page":4, "results":[ 20 records ], "total_pages":6, "total_results":117 }
{ "page":5, "results":[ 20 records ], "total_pages":6, "total_results":117 }
{ "page":6, "results":[ 17 records ], "total_pages":6, "total_results":117 }

At this point, you have retrieved 117 unique TMDb movie IDs.

However, if you then request page 7, you will get:

{ "page":7, "results":[ 20 records ], "total_pages":9, "total_results":175 }

Two of the movies returned in these 20 records are not in the original 117:

74146: Classic Cartoon Favorites, Vol. 5 - Extreme Sports Fun
74148: Classic Cartoon Favorites, Vol. 6 - Extreme Music Fun

For page 8, you get more:

{ "page":8, "results":[ 20 records ], "total_pages":9, "total_results":175 }

Four of these 20 are new:

51313: Esperando la Navidad
39251: Fluppy Dogs
46235: Little Einsteins - The Legend of the Golden Pyramid
126570: The Chronological Donald Volume Three

For page 9:

{ "page":9, "results":[ 15 records ], "total_pages":9, "total_results":175 }

One of which is new:

38566: Winnie the Pooh - ABC's

If you request page 10, you finally get an empty result set:

{ "page":10, "results":[], "total_pages":9, "total_results":175 }

However, note that all total you have only retrieved 172 records - not 175. And, only 124 of those are actually unique.

I have not examined the actual results returned by the web search, but it appears to show this same behavior.

This will put you on "Page 12 of 12" of 117 results: https://www.themoviedb.org/search?query=disney&movie_page=12

This will put you on "Page 13 of 18" of 175 results: https://www.themoviedb.org/search?query=disney&movie_page=13

Page 19 will finally show "We didn't find any movies."

BTW... if you click "formatting help" on the new discussion form, the top of the modal pop-up is outside the viewport and you can't get rid of it. (A preview would be nice too)

1 răspuns (pe pagina 1 din 1)

Jump to last post

The fist issue you describe is probably related to different pages being cached at different times and then in between cached entries, things like popularity get adjusted ever so slightly which will have items appear on different pages at different times. Not much we can do about this, you will just have to code around it.

The second issue, related to the weird number of total_results is weird. It's probably related to the crazy custom pagination code that we're currently using. Movie (and maybe person) search is I think, the only place this is used so I would be surprised if you ever saw this problem anywhere else. Unfortunately I can't do anything about this until some stuff out of my control is addressed. I know that was vague but there's some business things that we've been trying to address for about a year now and still haven't achieved. Our hope is that by the end up January these get done and at that point I am free to re-factor search.

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