How to SetMovieDetails with "Video.Rating.Set"?
#1
Currently I have a script that sets a video rating using VideoLibarary.SetMovieDetails with params of "rating":"new_rating"

I want to upgrade this to "ratings" where I create variables with the rating names (actual use case is "video" and "audio").  Per the schema I need to send a Video.Rating.Set in the params block, but I don't know what that set should look like?  Do I also have to set "rating"?  It seems like "rating" is intended to return the default member of "ratings" but I don't see how this is controlled?  I don't want to overwrite any scraped ratings.

scott s.
.
Reply
#2
You'll feed the "ratings" parameter a nested object like

json:
{"video":{"rating":7,"default":false},"audio":{"rating":9}}

The "default" parameter of the inner object is what determines which rating is used as the original "rating" parameter; it defaults to false for new ratings and is not required. No need to set the original "rating" param itself. As long as scrapers don't add a rating with the name "video" or "audio" then this won't overwrite ratings from scrapers.

A full request looks something like

json:
{"jsonrpc":"2.0","id":71,"method":"VideoLibrary.SetMovieDetails","params":{"movieid":2600,"ratings":{"video":{"rating":7},"audio":{"rating":9}}}}

If you happen to want to remove a rating, use "null" in place of the inner object.
Reply
#3
Thanks a bunch.  I have enough to get to work now.

scott s.
.
Reply
#4
Just to close the loop I got this working fine, but now that I have ratings I see that the support for them in skinning is limited, in particular apparently no ability to use ratings in media containers views, only on info dialogs and no support for the video player / fullscreenvideo.

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
How to SetMovieDetails with "Video.Rating.Set"?0