دعم الموقع

Hi,

I've been having trouble reproducibly paginating results with /discover/ when sorting results. I'm not sure whether this is or a bug, or I'm doing something wrong. Any advice either way would be very gratefully received.

Here's the problem: if - for example - I want to get a list of all movies associated with Humphrey Bogart (actor id: 4110) via discover, then there should be 5 pages of results with a total of 83 distinct entries (according to the total_results and total_pages fields). If I collect the results from all pages with an iteration that queries the following urls (sorting by revenue descending)...

http://api.themoviedb.org/3/discover/movie?with_cast=4110&sort_by=revenue.desc&page=1&api_key=API_KEY http://api.themoviedb.org/3/discover/movie?with_cast=4110&sort_by=revenue.desc&page=2&api_key=API_KEY http://api.themoviedb.org/3/discover/movie?with_cast=4110&sort_by=revenue.desc&page=3&api_key=API_KEY http://api.themoviedb.org/3/discover/movie?with_cast=4110&sort_by=revenue.desc&page=4&api_key=API_KEY http://api.themoviedb.org/3/discover/movie?with_cast=4110&sort_by=revenue.desc&page=5&api_key=API_KEY

...then I end up with less than 83 distinct results (although there are 83 total results, just some of them are being repeated). I found this to be because how results are spread across the pages changes - so that if I were to repeatedly query just page 2 for example, then I wouldn't always get the same entries on that page.

At the moment I'm working around this by just calling the above URLS without 'sort_by=revenue.desc', which seems to fix things. It's no biggie of course, and I can easily sort things on my side. Just thought I'd point it out in case it's either a bug, or I have a misunderstanding that might still be tripping me up without me knowing it. Apologies if this has been brought up before, couldn't find anything on it.

Yours,

Nic

2 ردود (على هذه الصفحة 1 من 1)

Jump to last post

Hi sparrigan,

Yes, I am aware of some issues when using the default sort. I haven't been able to figure out why this happens sometimes but in the meantime, it's good to know you can get around it with the revenue.desc sort.

Good to know, thanks for clarifying!

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول