UK Film Ratings (PG, 12, 15 etc)

The question is all in the title - anyone know how I can bring in UK rather than US ratings as metadata?

I really want this too. I wonder if themoviedb could be modified to pick up the uk locale. No idea what’s involved maybe I’ll have a root around and see

Taking a look at themoviedb scanner seems like you could pick both from it.



<br />
    # Content rating.<br />
    metadata.content_rating = tmdb_dict['certification']<br />
      <br />
     # Release date.<br />
    try: metadata.originally_available_at = Datetime.ParseDate(tmdb_dict['released']).date()



and on themoviedb site it says they support languages http://api.themoviedb.org/2.1/methods/Movie.getInfo

I think all I need to do is change the query to en-uk. Why don't I just try it out.

edit/ Ok it partially works. I get all the movie info and the UK release dates, yay, but the rating/certification returns

"certification":null



Using I'm still here to try it out: http://api.themoviedb.org/2.1/Movie.getInfo/en-uk/json/a3dc111e66105f6387e99393813ae4d5/43939 (is it ok to leave the api key there?)
I guess it's something I need to take up with themoviedb, unless someone has another suggestion?

Wow - great efforts so far. I’m essentially useless at programming/editing these files, but your work has my wholehearted support!

I don’t know what I’m doing either but I’m always willing to give something a try :slight_smile: Plus the scanner is quite easy to decipher.



Using the default scanner actually return GB as the country but maybe that part’s not interacting for metadata. Or at least release/certification.

Tried it with a couple of films (with uk dates) but they all return a null just to make sure.



Fairly sure the certifications are just not in themoviedb database (sure I’ve got the wrong terminology), as when you go to enter classification on the site only the US ones come up in selectable items.

Will post there and see what they say

It’s always the small things. Need to use GB and not UK and it works perfectly.



Tested with Batman Begins Uk, release date and film rating



Just drop it in

Users/youruser/Library/Application Support/Plex Media Server/Plug-ins/


TheMovieDB UK.bundle.zip (101 KB)

Do you mean that scotland has a different scheme ? :)

Haha no, but they’re lucky enough to fall under the realm of the bbfc. For some reason (sure it’s a good one) the ISO code is GB for the United Kingdom. Maybe because we like having the word “Great” in our country name :smiley:



Could I have just added that to your bundle? I tried but it didn’t seem to work

Hey, i’ve missed your code update on themovieDB agent… I may try to incorporate this in my multiple-language support change but this raises a mojor problem for Plex : Plex only supports selecting the language, not the country you’re in, so i don’t see an easy way of doing this (and being portable for windows and mac). May be some devs could show up and answer that terrific question : Is there a way for plex to select the country we want to match movies in in an Agent ? :slight_smile:



ps: I’m a very good test case for this as I should search in fr-GB :slight_smile:


Great stuff Furby - I will drop this in and test this weekend. Just one question - should I use this as a full replacement for the default scanner?

Ye, who would have thought it would be that simple, I literally only added 3 characters. Just (an hour ago) rescraped by library with it and it worked prefectly.



1 minor problem though. As it has the same name it replaces the default moviedb scanner (so you’ve got no choice there), which means it’s overwritten when there are updates to themoviedb bundle are pushed. I just need to figure out how to rename it properly. I’ll do it today

I integrated this idea into themoviedb agent from Plex and submitted a pull request to git (https://github.com/Aqntbghd/TheMovieDB.bundle/commit/02363c13e1cf0ea7822b2d050c1dca945fbf3a71). This should allow to set the country in the preferences of the agent.



cheers,

Cool, so I can select en-gb from it?



From the thread about retroplex I’ve realised it still needs to be modified a little bit. To get the country specific flags it need to be preceded with the country code. So, the GB 15 rating is returned as “15” but needs to be “gb/15”.



I don’t know if this is true for all the skins though and I don’t know if it’s worth it. It seems simpler to just remove the US (Mpaa) ones from the contentratings folder and replace them with the country specific flags. Is that as confusing as it sounds?



Assuming I/you kept going with this though. I started watching the Google Learn Python Class. Have to learn sometime I guess. Could the country code just be added into the certification code line?



   # Content rating.<br />
    metadata.content_rating = str('gb/') + tmdb_dict['certification']



That's probably nonsense, but I've only go to part 1 and I realise that wouldn't be the proper way for multiple languages :P

I watched a bit more of the python class, I think I could do this in a not ridiculous way

Yes : ![post-29484-0-34101500-1300297010.png|679x395](upload://3Azc28FH9XSIOhRjqESYPW3ajl8.png)


Probably i should look more carefully how this is encoded in TMDB, but the mod is not only to get the right rating, it will also provide you with all the country-specific infos of the film (name if not the same as an exmaple of france vs canada) etc...

Wow this sounds great. Any idea when it will be released?



Also in your screenshot above I see it says ‘Use Movie Title from…’ and some obscured text. In my settings I don’t even see the obscured text. What is that setting supposed to be?

I don’t know when the plex dev will integrate/release this. If you like living dangerously, you can pick up the dev version from git : GitHub - Aqntbghd/TheMovieDB.bundle



it’s a bug :slight_smile: i’ve never figured out what was that text artefact :slight_smile:

Hey guys,



Looks like some good work you’ve been doing, though I have a question/problem.



Basically, I downloaded the bundle from the last link ( https://github.com/Aqntbghd/TheMovieDB.bundle ), unzipped then copied, and after placing it into the correct folder, I restarted the PMS.



Now I have been trying to get the ratings to update but to no avail. Not one of the films I have tried to update picked up the BBFC rating, and remain with the American style rating. I have tried deleting both Plex folders from Library/Application Support (I’m on a mac) then reinstalling Plex, but not adding any media, then swapping out the bundle before restarting Server and adding, but this does not appear to work.



Was wondering whether you might know of a ‘flush’ function, or workaround, as I have literally just had to manually update all 200 odd films in order to get the correct thumbnails appearing again.



Many thanx in advance.



Robsta

Do a Shift+refresh to redo the whole library.



Not all the films have BBFC ratings on TMDB so update them if you notice them missing.

this worked well for me, maybe 70% of BBFC ratings found on a force refresh. Thanks!

I’ve been trying for ages to install this bundle on my linux pms but cannot seem to manage it, does anybody know exactly where I’m supposed to put the bundle, so far I’ve put it in these two places:



/plex/PlexMediaServer/Resources/Plug-ins



~/Library/Application Support/Plex Media Server/Plug-ins