The Movie Database 支持

Case Filter with: release_date_gte: 2020-01-01 release_date_lte: 2024-12-31 with_watch_provider: 8|9|10 sort_by: vote_count.desc

Expected: Only film in the range of date sorted with vote_count_desc

Effective Output: FIlm sorted with vote_count_desc before release_date_gte

It's my fault?

4 回复(第 1 页,共 1 页)

Jump to last post

Hi @sourheart,

First off, the filters are release_date.gte and release_date.lte.

And if you're using these filters, you'll want to make sure to use a region filter as well, unless you're meaning to query all release dates worldwide. If that's not what you want, I would suggest switching to primary_release_date.gte and/or primary_release_date.lte.

But more importantly, I'll need to see the full HTTP request you're making before I can tell you anything for certain.

Hi @travisbell

This is the curl

curl --request GET \
     --url 'https://api.themoviedb.org/3/discover/movie?include_adult=false&include_video=false&language=en-US&page=1&release_date.gte=2021-01-01&release_date.lte=2023-12-31&sort_by=primary_release_date.asc&with_genres=27&with_watch_providers=8%7C9%7C10' \
     --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhMzg2MDE5ZTM0NDUwNGE5ZTAwMTg4Mzk3YWQ3OGNlMyIsInN1YiI6IjY1ZGM5YThhMDNiZjg0MDE4NGFmZTNmNCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.XF71Pcl__4rX8xr5KMzug5gvhnDzuMq5HhxCX5YtbLU' \
     --header 'accept: application/json'

As you can see the first result is:

{
      "adult": false,
      "backdrop_path": "/tQRHrssevbysfmDG9FbA86qesCH.jpg",
      "genre_ids": [
        27,
        878,
        18
      ],
      "id": 3016,
      "original_language": "en",
      "original_title": "Dr. Jekyll and Mr. Hyde",
      "overview": "A doctor's research into the roots of evil turns him into a hideous depraved fiend.",
      "popularity": 7.498,
      "poster_path": "/u8OL0RbTNzqqB1WmkxroTBXohnv.jpg",
      "release_date": "1920-03-18",
      "title": "Dr. Jekyll and Mr. Hyde",
      "video": false,
      "vote_average": 6.769,
      "vote_count": 130
    }

Right, you have sort_by=primary_release_date.asc but are filtering by release_date.xxx. As I mentioned above, you should change that.

https://api.themoviedb.org/3/discover/movie?include_adult=false&include_video=false&language=en-US&page=1&primary_release_date.gte=2021-01-01&primary_release_date.lte=2023-12-31&sort_by=primary_release_date.asc&with_genres=27&with_watch_providers=8|9|10

Ok, perfect with this change it works, thanks!

A little feedback: I've seen a bit of the movie API for the "recommended" feature, it would be even more useful if you could also select the primary_release_date range there too

找不到电影或剧集?登录并创建它吧。

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区