Jump to content

Welcome, Guest!

Be a part of CinemaVision today! Once registered and logged in, you will have access to public chat and your own private messenger, you can view and contribute guides, collaborate on the forums, review downloads, give reputation to your fellow members, contribute content and so much more. Registering is quick and completely free, so what are you waiting for?
   Sign In    Sign Up

Become a RedCarpet Club Member Today!

   Join Now

[Guide] Adding Custom Ratings to CinemaVision

Recommended Posts

Adding Custom Ratings to CinemaVision

CinemaVision Version: 1.1.0

For the past year or two, I've been enjoying CInemavision but have always been very disappointed that the rating systems included are only for those in the US and a few countries in Europe. I've asked multiple times for the Australian rating system to be included and I've been told it's pretty easy but it hasn't really gone anywhere, which is fair enough considering I don't think it's fair for the devs to be focused on every country but instead, it should be a community effort. Upon digging through the add-on files and figuring out (to the best of my ability) how CInemavision includes a countries rating system, I've managed to add the OFLC to my copy of Cinemavision and I thought I'd document how I went about it in the hopes others who might be hoping to introduce their own rating system into Cinemavision can do so. Or, you know, improve on whatever I've managed to do. In any case, here's what I did to introduce the OFLC (Australia's rating system) into CInemavision.


  • Text Editor (Notepad++ Recommended)
  • Custom Bumpers for your rating system (Either from the 'files' section or by creating your own)
  • Movie Scraper Settings properly set to scan for your rating system (eg. TMDB classification set to your country code)


Kodi Addons Directory:

CinemaVision Location: addons/script.cinemavision/



Step 1: Creating the XML Reference Sheet

Inside "lib/cinemavision/rating_systems/" we can see a list of .xml files that act as reference sheets. The is the BBFC as an example:

<system name="BBFC">
    <rating value="185">R18</rating>
    <rating value="180">18</rating>
    <rating value="150">15</rating>
    <rating value="125">12</rating>
    <rating value="120">12A</rating>
    <rating value="80">PG</rating>
    <rating value="0">U</rating>
    <rating value="0">Uc</rating>

The name parameter holds the classification name, with the region holding the countries region. After that, within the <system> tags, we create a new <rating> tag for every classification within our system. You'll also notice the value parameter within every <rating> tag. This is (to the best of my knowledge) what CinemaVision uses to determine the severity of the rating because it differs from country to country. For example, both 'U' and 'Uc' are 0 because they are different classifications but are both 'Universal' with the latter being specifically for children. In creating your own, you can adjust these values however you want, but I found it helpful to compare the values against the MPAA's values. In fact, it looks like the values represent the "minimum age" with a 0 at the end.  The MPAA doesn't have a .xml file because it's hardcoded within 'ratings.py' but we can see there that the values are as follows:

MPAA Values
Rating Value
G 0
PG 120
PG_13 130
R 160
NC-17 170
NC 1000

Note how PG-13 is '130' and NC-17 is '170', they represent what the rating states the minimum (or suggested minimum age) is. It doesn't really matter how closely they match the MPAA system but it can be a good point of reference when incorporating your own rating system into CInemaVision. For the most part, Australia's rating system is pretty similar to the MPAA, and this is what I came up with the OFLC:

<system name="OFLC">
    <rating value="180">R18</rating>
    <rating value="150">MA15</rating>
    <rating value="120">M</rating>
    <rating value="80">PG</rating>
    <rating value="0">G</rating>
    <rating value="0">E</rating>

E and G are both 0 because E films are 'Exempt' and G are 'General' so they both have no 'minimum' age. Using this as a template, you should have a pretty good idea of how to go about creating one of your own. When you're done, save the .xml as the classification name within the 'rating_systems' folder (in my case, OFLC.xml).


Step 2: Adding references within the Python Code

Wait, don't leave! I promise this isn't as scary as it sounds! Hear me out. What we need to do is go into 3 python files and add references to whatever classification we are adding. The first of which is located within the 'lib/cinemavision' directory, wherein we found 'rating_systems'. You'll notice a file called 'ratings.py' and that's what we need to edit, so open it in Notepad++ or your code editor of choice. All that we need to worry about is this little dictionary at the top:

    'DE': 'FSK',
    'GB': 'BFS',
    'BR': 'DEJUS',
    'ES': 'ICAA',
    'US': 'MPAA'

It should be pretty self-explanatory - there's a country code and the corresponding classification system. Kodi actually uses these country codes internally instead of the system name, and it's here where CinemaVision links them up. Kodi uses the 'ISO 3166-1 alpha-2' convention (bit of a mouthful) but if you aren't sure, head up to the resources tab at the top of this post to find a lookup table for your country. As you might have guessed, it's pretty simple to add a new entry to the list. Make sure you add a comma to what came before and match this template:

"country_code" : "classification_name"

And that's it! Save ratings.py and we can move on. So my current COUNTRY_SYSTEMS dictionary looks like this:

    'DE': 'FSK',
    'GB': 'BFS',
    'BR': 'DEJUS',
    'ES': 'ICAA',
    'US': 'MPAA',
    'AU': 'OFLC'

The second file is just as harmless. In the same 'lib/cinemavision' directory, open 'content.py' and in the UserContent class you should see the 'Ratings Bumper' section:

('Ratings Bumpers', (

Same as before, simply add a comma to the last entry and in single quotes add the classification name. Save, and we can move on the slightly harder part, but also the last of coding!

Go back a directory so we're just in the "lib" folder, and you'll see 'cvutil.py'. Open that up, and do a search for the "RatingParser" class. It should be on line 393, but this is what we're looking for:

class RatingParser:
        # 'MPAA': r'(?i)^Rated\s(?P<rating>Unrated|NR|PG-13|PG|G|R|NC-17)',
        'BBFC': r'(?i)^UK(?:\s+|:)(?P<rating>Uc|U|12A|12|PG|15|R18|18)',
        'FSK': r'(?i)^(?:FSK|Germany)(?:\s+|:)(?P<rating>0|6|12|16|18|Unrated)',
        'DEJUS': r'(?i)(?P<rating>Livre|10 Anos|12 Anos|14 Anos|16 Anos|18 Anos)'

    RATING_REs = {
        'MPAA': r'(?i)(?P<rating>Unrated|NR|PG-13|PG|G|R|NC-17)',
        'BBFC': r'(?i)(?P<rating>Uc|U|12A|12|PG|15|R18|18)',
        'FSK': r'(?i)(?P<rating>0|6|12|16|18|Unrated)',
        'DEJUS': r'(?i)(?P<rating>Livre|10 Anos|12 Anos|14 Anos|16 Anos|18 Anos)'

It's...a little intimidating, but it's really not that bad. Basically, this is a 'regex' command that is designed to sort data and in this case, it's parsing ratings for every country. It follows the same structure that we've seen thus far with the classification name on the left, and the 'data' or 'result' on the right of a colon. All we really need to worry about is the result side of the dictionary, so I'll show you what I came up with for the OFLC and how I got there:

SYSTEM_RATING_REs: 'OFLC': r'(?i)^(?:AU)(?:\s+|:)(?P<rating>E|G|PG|MA15|R18)'
RATING_REs: 'OFLC': r'(?i)(?P<rating>E|G|PG|MA15|R18)'

They're the same except 'SYSTEM_RATING_REs' looks for the country code whilst 'RATING_REs' doesn't. For your country, all you need to do for SYSTEM_RATING_REs is fill in your classification system, change the country code and add all of your ratings after the <rating> tag, with every rating having a | in between. and in RATING_REs, do the same except without the country. My recommendation here is to duplicate one of the lines that are already there, add an extra comma and replace the relevant information. I copied the BBFC and used that as a reference but it really doesn't matter, they all follow the same format so long as your country code and classifications are in there, next to your classification system. So this is how it should look, with the relevant information filled in of course:

        # 'MPAA': r'(?i)^Rated\s(?P<rating>Unrated|NR|PG-13|PG|G|R|NC-17)',
        'BBFC': r'(?i)^UK(?:\s+|:)(?P<rating>Uc|U|12A|12|PG|15|R18|18)',
        'FSK': r'(?i)^(?:FSK|Germany)(?:\s+|:)(?P<rating>0|6|12|16|18|Unrated)',
        'DEJUS': r'(?i)(?P<rating>Livre|10 Anos|12 Anos|14 Anos|16 Anos|18 Anos)',

    RATING_REs = {
        'MPAA': r'(?i)(?P<rating>Unrated|NR|PG-13|PG|G|R|NC-17)',
        'BBFC': r'(?i)(?P<rating>Uc|U|12A|12|PG|15|R18|18)',
        'OFLC': r'(?i)(?P<rating>E|G|PG|MA15|R18)',
        'FSK': r'(?i)(?P<rating>0|6|12|16|18|Unrated)',
        'DEJUS': r'(?i)(?P<rating>Livre|10 Anos|12 Anos|14 Anos|16 Anos|18 Anos)',


Save that and, phew, done! That's all of the coding out of the way, and we're almost done too! Just one more thing...

Step 3: Adding Classification into UserData

After all of this, you'd think we'd be done. And I did too, but for the longest time I couldn't figure out why when I went to select OFLC in the CinemaVision settings it wasn't there. That's because the options are actually generated in a completely different directory. Go right out, back into the Kodi base directory, so out of addons and go to the following directory:


Here, you'll see a folder of every classification. And inside every folder is null files with a name following this format:


So we need to create a new folder with the system name and fill it with void files that have the same naming structure. I simply copied the MPAA files and renamed the ones I needed to and copied and pasted an additional one for 'E'. You're going to need to be able to alter file extensions so make sure you can see file extensions and alter them before going forward - Google is your friend!


Step 4: Profit! ... for now

And that's it! Now if you go into the CinemaVision settings and go to change settings, you'll be able to select your new system! So, what now? Well, assuming your movie scraper settings are set to support your country, the next time you try to run CinemaVision with your new system you should see it in the menu but you won't get any rating bumpers because we don't have any! This part should be pretty easy for those who have bothered to read this far as you should be familiar with adding custom content. Basically just set a content folder, go into Ratings Bumpers, create a folder for the new system and fill it with videos/images with the rating for the name (MA15.png/MA15.mp4), then update the content in the settings every time you add something new. I managed to find a collection of videos on youtube someone had made for their own personal collection which I am planning on reuploading for Australians who stumble here wanting to find OFLC content. That playlist can be found in the resources up the top, but google your classification with "bumper" or "ident" on the end and things should start to pop up. Or maybe, if you felt so inclined, you could find the classification assets and create the content yourself! Just remember to share it with the rest of us!


Final Thoughts:

I'll be the first to admit that this is a SUPER hacky way of adding in custom ratings, but it's the only way to go about it for the time being. I've been told that it's been as simple as adding the XML with the values but it's clearly not that easy. Hopefully, now, others can start to jump through these pretty easy hoops and share it with the rest of us, or perhaps one brave warrior can go through and add every classification? Last I checked though, the GitHub is locked down so I'm not sure how we'd even distribute these files. In any case, this is my first guide so I really hope this doesn't crash when I try to post and that it's been helpful!

Edited by Hendo16
Forgot to add reminder to properly set up movie scraper settings and tags. Also spelling mistakes.
  • Like 2

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Guidelines and Terms of Use.