The Movie Database 支持

Is the release date returned for the movies in for example /person{[id}/credits/ always for the US?

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

Jump to last post

Hi benregn,

No. The way it works is first we choose the primary release date (if one of chosen), then if one isn't, we choose the US date. If there is no US date, we simply choose the first one.

Most movies have a primary release date these days so that is the date that gets returned.

Thanks for the reply Travis.

One more thing, what is a primary release date?

It's the date marked as such with a "green check" when editing a movie.

Example: https://www.themoviedb.org/movie/109428-evil-dead/edit?active_nav_item=release_information

Hi Travis,

I find this to be a little problematic, as when I search for upcoming movies, the result for the film Antiviral (id: 125490 ) has release date "2012-11-30" (IS) but when I actually pull back the entire films data, the release date is shown as "2013-04-12" (US)

I can work around it but it seems like undesired behaviour to me.

Can you confirm please?

Thanks

p.s. again, my message is considered spam, here' the paragraph I had to cut out

This causes me an issue when I try to create a friendly url such as film title + year released. I store the results of the upcoming results, so I create the film antiviral-2012 but when I click on it, I retrieve the entire films data and this creates a different title+year key.

p.p.s. I really want to get more involved on these forums as I feel I have some good experiences to share with the TMDB API but your spam filter gets me everytime and I've near given up!

With regards to the spam filter, thanks for letting me know. It's a 3rd party service and mostly out of my control but I will see if they changed something recently as we've been using it for almost a year now with zero issues.

With regards to the release date issues, I'm still not totally sure how the API can work any differently based on your requirements.

One thing worth mentioning because I can imagine the issue but aren't actually seeing it is that Antiviral looks like the U.S. release date is actually 2012-09-20 on TMDb.

We do have an open ticket to allow support for a country parameter (alongside language) so you can query a particular countries information by default but you can already get 80% there by using ?append_to_response and releases. Example:

http://api.themoviedb.org/3/movie/125490?api_key=###&append_to_response=releases

And you can pluck any date you want out of the releases array.

Hey Travis

thanks for getting back, and good to open a channel a communication with you. I've seen your comments on here in the past, and I can say you've done sterling work indeed, sir! I doth my cap to you!

So here's a snippet of the result I get back for the query:

http://api.themoviedb.org/3/movie/125490, params: {:params=>{:api_key=>"xxx", :per_page=>50, :append_to_response=>"alternative_titles,casts,images,keywords,releases,trailers,translations,similar_movies"}}

production_companies: [], production_countries: [], release_date: "2012-11-30", revenue: 0, runtime: 110,

and in the body regarding release date:

[{"iso_3166_1"=>"CA", "certification"=>"14A", "release_date"=>"2012-10-12"},
{"iso_3166_1"=>"FR", "certification"=>"", "release_date"=>"2013-02-13"},
{"iso_3166_1"=>"SE", "certification"=>"", "release_date"=>"2012-09-21"},
{"iso_3166_1"=>"ES", "certification"=>"", "release_date"=>"2012-10-10"},
{"iso_3166_1"=>"GB", "certification"=>"", "release_date"=>"2013-02-02"},
{"iso_3166_1"=>"IS", "certification"=>"", "release_date"=>"2012-11-30"},
{"iso_3166_1"=>"US", "certification"=>"NR", "release_date"=>"2012-09-20"}]}

and the results for AntiViral from the Upcoming trend:

http://api.themoviedb.org/3/movie/upcoming, params: {:params=>{:api_key=>"xxx", :per_page=>50}}

#<Film _id: 125490 backdrop_path: "/ODoj19dJscRSulVB2njg4fjy57.jpg", original_title: "Antiviral", release_date: "2012-11-30", poster_path: "/r2d60JkmkwigFDKYKIEsubqqfZs.jpg", title: "Antiviral", vote_average: 7.7, vote_count: 5>

Is it possible you populate the upcoming data set at a different time, so when you did, AnitViral perhaps only had one release date set (IS) but later on the US release date was added and the upcoming data source has not been update? Or do you create a summary from a single data source?

Let me know if I've making an obvious mistake!

Thanks

Sky

Hey Sky,

Is it possible you populate the upcoming data set at a different time

Every page is cached whenever it is first requested so yes, absolutely BUT the upcoming pages are only cached for 24 hours or less. And if you look at the change history for Antiviral, the U.S. (or primary) release hasn't been changed since April 11. Did you originally make a request a week or longer ago? Obviously, with a community edited database like TMDb, data changes every minute.

Hey,

Me again,

I have a feeling the issue is do with me caching the data. The entire films data was retrieved and cached, and then when the date was changed, the upcoming (which is a real time search) had the latest date. Therefore, my old film data was inconsistent.

In answer to your question, your are indeed correct. The data was stagnant. Fetched date is: 2013-04-07

I haven't implemented a worker process to go through the changes API yet. I thought I had cleared my cache down locally a lot more recently. hmm

guess that's on my priority list! The programmers dilemma, "to cache or not to cache, that is the question"

Sorry for any inconvenience!

Heh, it sure is. One of the hardest problems to solve is always caching.

Keep in mind you can use the change methods to keep data in sync with your local DB.

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

全站通用

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

在媒体页面

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

在电视季页面

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

在电视集页面

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

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

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

在讨论页面

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

设置

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

登录

还不是会员?

注册加入社区