Υποστήριξη για το The Movie Database

When I use the other Search functions, and view different pages, then even after I pass the end (view page: total_pages + 1), I get a total_pages value that is not 0 (an actual page number). However, with TV searching, when I pass the end, it shows 0 as the total page number.

Could this be fixed, so that all the search functions have the same way of working?

8 απαντήσεις(στη σελίδα 1 από 1)

Jump to last post

Hi Mike,

I'm getting the same behaviour on both movie and TV searches:

http://api.themoviedb.org/3/search/movie?api_key=###&query=fight+club&page=2
http://api.themoviedb.org/3/search/tv?api_key=###&query=nurse+jackie&page=2

Both return:

{
  "page": 2,
  "results": [],
  "total_pages": 0,
  "total_results": 0
}

Can you give me an example of what you mean?

I must have been tired. I just ran through my tests again and found that your'e right about Movie searching. I must have been thinking of it, but meant something else. Because what I can see is that these are giving the results I talked about:

As total_pages equals 0 is now the expected value, I have found that List, Tv , Person and Movie behave as expected. These give other results:

http://api.themoviedb.org/3/search/company?query=20th&page=2&api_key=###
{"page":2,"results":[],"total_pages":1,"total_results":10}

http://api.themoviedb.org/3/search/keyword?query=plot&page=2&api_key=###
{"page":2,"results":[],"total_pages":1,"total_results":16}

http://api.themoviedb.org/3/search/collection?query=007&page=2&api_key=###
{"page":2,"results":[],"total_pages":1,"total_results":2}

But I must say, I rather better like the idea that it's returning useful data for those high(er) pagecounts.

-Mike

Hey Mike,

I see the consistency you're talking about. IMO, the way company/keyword/collections work should the the way everything works. I'm not sure where movie and TV is different but I'l probably end up fixing it so it's the same everywhere.

I've created a new ticket for this here.

The fix for this is now live, everything should be consistent now. If you spot one that isn't, let me know.

All our unit tests pass through now. Seems to work :)

(Sorry, I reopened the thread)

I might have been too quick, seems the caching is messing with me, the following three requests exhibit different results:

/genre/28/movies?api_key=###&language=it&include_all_movies=false
total_results=1507

/genre/28/movies?api_key=###&language=it&include_all_movies=false&page=1
total_results=1508

/genre/28/movies?api_key=###&language=it&include_all_movies=false&page=2
total_results=1508

I can see in the headers of the response, that the first request s significantly newer than the other two:

X-Memc-Age: 126

Vs.

X-Memc-Age: 19714
X-Memc-Age: 19697

This might indicate a cache purging mechanism that doesn't account for the missing page parameter (or I'm just very unlucky :))

Hey Mike,

Heh, yes, you will have to wait for the caches to expire. On a related note, there will always be the potential that when pages are cached, new items could be added that would not get reflected in any counts or results until the cache expires. I believe the genre pages are cached for 6 hours (you can see the time the object will expire with the X-Memc-Expires header).

Cheers.

Of course, I was just worried that you may have had a pre-fetching service which populated the cache. The ½-hour gap (the time before the other two expired) may have indicated that something wasn't being fetched correctly.

I'll manage :)

Δεν μπορείτε να βρείτε κάποια ταινία ή σειρά; Συνδεθείτε για να τη δημιουργήσετε.

Σε όλες τις σελίδες

s Εστίαση στη μπάρα αναζήτησης
p Άνοιγμα μενού προφίλ
esc Κλείσιμο ανοιχτού παραθύρου
? Άνοιγμα παραθύρου συντομεύσεων πληκτρολογίου

Στις σελίδες μέσων

b Επιστροφή στην προηγούμενη σελίδα(ή στην αρχική σελίδα όταν είναι εφικτό)
e Μετάβαση στη σελίδα επεξεργασίας

Στις σελίδες κύκλων σειρών

(Δεξιό βέλος) Μετάβαση στον επόμενο κύκλο
(Αριστερό βέλος) Μετάβαση στον προηγούμενο κύκλο

Στις σελίδες επεισοδίων σειρών

(Δεξιό βέλος) Μετάβαση στο επόμενο επεισόδιο
(Αριστερό βέλος) Μετάβαση στο προηγούμενο επεισόδιο

Σε όλες τις σελίδες εικόνων

a Άνοιγμα παραθύρου προσθήκης εικόνας

Σε όλες τις σελίδες επεξεργασίας

t Άνοιγμα επιλογέα μετάφρασης
ctrl+ s Υποβολή φόρμας

Στις σελίδες συζήτησης

n Δημιουργία νέας συζήτησης
w Ρύθμιση κατάστασης παρακολούθησης
p Ρύθμιση ως δημόσια/ιδιωτική
c Ρύθμιση ανοίγματος/κλεισίματος
a Άνοιγμα δραστηριότητας
r Απάντηση στη συζήτηση
l Μετάβαση στην τελευταία απάντηση
ctrl+ enter Υποβολή μηνύματος
(Δεξιό βέλος) Επόμενη σελίδα
(Αριστερό βέλος) Προηγούμενη σελίδα

Ρυθμίσεις

Θέλετε να αξιολογήσετε ή να προσθέσετε αυτό το στοιχείο σε μια λίστα;

Σύνδεση