The Movie Database Support

I and others have observed that when you set a movie's rating that the value is sometimes recorded as a zero. I have done this both through the web and through the API. I haven't debugged what conditions cause this to occur yet. It might occur when you have rated more than the max number of movies allowed per day (I think around 6). In any event, zero values can skew the results quite a bit.

As I see it there are two problems: 1) Why the site stores a zero instead of the intended value 2) When a user sets a value, any previous value that the user gave for that movie should first be deducted from the average movie rating before adding the new value. This will prevent a user who votes multiple times from skewing the average. It will also allow for a user to fix an incorrect value be simply re-voting without having to inflate their rating so that when averaged with their 0's will come out to the right number.

4 replies (on page 1 of 1)

Jump to last post

Hi Frank,

You are not able to set 0 as a rating:

$ curl -v -H "Accept: application/json" -H "Content-Type: application/json" -d "{'value': 0.0}" "http://api.themoviedb.org/3/movie/550/rating?api_key=###&session_id=###"
* Trying 54.235.177.9...
* TCP_NODELAY set
* Connected to api.themoviedb.org (54.235.177.9) port 80 (#0)
> POST /3/movie/550/rating?api_key=###&session_id=### HTTP/1.1
> Host: api.themoviedb.org
> User-Agent: curl/7.54.0
> Accept: application/json
> Content-Type: application/json
> Content-Length: 14
>
* upload completely sent off: 14 out of 14 bytes
< HTTP/1.1 400 Bad Request
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After
< Cache-Control: public, max-age=0
< Content-Type: application/json;charset=utf-8
< Date: Sun, 03 Jun 2018 15:22:54 GMT
< Server: openresty
< Content-Length: 84
< Connection: keep-alive
<
* Connection #0 to host api.themoviedb.org left intact

{"status_code":18,"status_message":"Value too low: Value must be greater than 0.0."}

On the website, even if I try to click on the most left edge of the zero stars and click it, sure the green "success banner" says a rating is saved but it's not actually. That rating will never get added since it's 0. There's some strict validation right on the model that prevents this from happening. I am not aware of anywhere that you can save a 0.0 rating.

I'll try to reproduce. I know that I have repeatedly set a rating to something, like 5, only to see the average displayed as 2.5. Perhaps the number of ratings is bumped up twice instead of adding a 0? This would effectively do the same thing: total_of_Ratings=5 / Number_of_Ratings=2 => 2.5.

I rated "War Nurse" (1930) this morning. I watched the movie because it was unrated, however, I did not check before watching it. It is possible someone rated it before me, but I don't think so.

The page (https://www.themoviedb.org/movie/162967-war-nurse) shows my rating as 6, votes averaging 3.0. The Search -> Movie Results page (https://www.themoviedb.org/search?query=war+nurse) shows "War Nurse" as being NR (not rated). From my Kodi plugin I can see that there were two votes cast, averaging 3.0, and my rating 6.

Question: how can the average be 3.0 if I rated it 6, unless the other rating is 0, which I understand is not supposed to be possible?

I just looked into this for you and it's data that was saved before the zero validation was implemented in early 2015. There is two ratings, one from Jan. 2015 and one from today. So while creating new ratings has been blocked since early 2015, the average query was still picking up the ones created before then.

I'll be re-running the averages on movies and TV shows later today which will exclude them.

Edit: Just so you can see, the rating for War Nurse has been updated properly.

Edit #2: The re-average is complete, you won't see the updated values on the API until the cache expires in ~8 hours.