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 回复(第 1 页,共 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.

找不到电影或节目?登录并创建它吧。

全站通用

s 聚焦到搜索栏
p 打开个人资料菜单
esc 关闭打开的窗口
? 打开键盘快捷键窗口

在媒体页面

b 返回(或返回上级)
e 进入编辑页面

在电视季页面

(右箭头)下一季
(左箭头)前一季

在电视集页面

(右箭头)下一集
(左箭头)上一集

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

t 打开翻译选择器
ctrl+ s 提交

在讨论页面

n 创建新讨论
w 切换关注状态
p 设为公开 / 私密讨论
c 关闭 / 开放讨论
a 打开活动页
r 回复讨论
l 跳转至最新回复
ctrl+ enter 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区