دعم الموقع

Hi! I'm using the TMDB API to build a small application. I use the /search/movie endpoint to list movies. While implementing paging I noticed that multiple pages can apparently contain the same entry. As an example, at time of testing:

https://api.themoviedb.org/3/search/movie?query=Star Wars&include_adult=false&language=en-US&page=7
https://api.themoviedb.org/3/search/movie?query=Star Wars&include_adult=false&language=en-US&page=8

Page 7 and 8 both contain the entries "The Making of Star Wars Attack of the Clones" (id: 1152956) and "Star Fleet: The Thalian Space Wars" (id: 584907).

When I make the same queries with include_adult=true, I don't (seem to) get duplicate entries.

I don't know much about backend/db querying but I believe the filtering of adult entries is done at the wrong point in the data flow, which causes duplicate entries in separate pages.

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

Jump to last post

You're just running into the cache. Some previous pages were already cached but then when our nightly re-index runs (which will change the popularity) and as pages expire, the data returned can be in a different order.

By using a new parameter (include_adult) you're going to run into fewer pages that have been cached.

Bottom line though, we make no guarantees about the order of the items returned in search and discover. Requests can be cache. It's best to just grab the data from the pages you're interested in and then de-duping the data locally on your end.

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

عام

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

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

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

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

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

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

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

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

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

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

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

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

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

الاعدادات

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

تسجيل الدخول