Jump to content

Fix to handle mpaa ratings with more text


dethknite
Go to solution Solved by Deathsquirrel,

Recommended Posts

dethknite

The scraped movies seem to contain more text than just Rating from IMDB.

 

ie.

<mpaa>Rated R for violence throughout, language and brief nudity</mpaa>

 

This makes parental controls not work at all and movies that are R show up under a Kids profile set to only allow up to PG.

 

perhaps adding in the ability to detect "Rated " keyword and then parse for the next characters up to " " (trailing space).

post-4853-0-44488700-1405986597_thumb.png

  • Like 1
Link to comment
Share on other sites

I'd like to know exactly what provider it's coming from first. can you or someone do some testing? thanks.

Link to comment
Share on other sites

dethknite

I can do further testing... I have all my movies and tv shows setup for XBMC access, pre-scraped from IMDB.  It appears the scraper pulls the MPAA tag.

 

http://www.imdb.com/title/tt1272878/parentalguide?ref_=tt_stry_pg#certification

 

MPAA:
Rated R for violence throughout, language and brief nudity
Link to comment
Share on other sites

well i could but how will that work for german users, or other languages? I don't think what media companion is doing is a very good thing, especially since the R can be extracted from the main movie page separately and saved into mpaa, while the full sentence can go into mpaadescription. So really the best solution is for them to make the change and use the tags as they were intended to be used, instead of asking us to try and hack around it.

  • Like 1
Link to comment
Share on other sites

dethknite

Thanks.. was not aware there was an mpaadescription tag.. If that is the case I can batch up something to troll through my .nfo files and fix them.

Link to comment
Share on other sites

dethknite

Further analysis:

I reprocessed all movies and TV and created movie.xml and .nfo files.  The issue still occurs with unknown ratings.

 

For example..

Devil's Knot

http://www.imdb.com/title/tt0804463

http://www.themoviedb.org/movie/152792

 

The rating MediaBrowser 3 scraped was "15", this does not match any of the filtering used in parental controls, so I would assume it should not display since I have it set to not allow non rated movies.  But it shows up.  It seems the do not allow un rated movies only works for blanks.

 

Also failing are "Non Rated", "Not Rated", "Approved", "Rated R for sexual content, nudity and some language", etc.

 

Perhaps a good fix would be to disallow anything that does not match.. and perhaps strip off the "Rated " if it exists.

__________________________

 

Plex uses the following:

<mpaa>Rated PG-13</mpaa>

__________________________

 

XBMC skins rating:

"Rated Country:Rating"

ie. "Rated US:PG-13" or "Rated PG-13"

__________________________

 

As reported in inssue #426

The output nfo now automatically puts a "Rated " in front of the mpaa rating value you have.

1. MPAA Ratings - <mpaa></mpaa> tag - XBMC expects the literal "Rated " to appear before the actual rating (example <mpaa>Rated R</mpaa>).

If you want the actual "UK:U" to appear in the mpaa, change your pattern to:

(?<grp1>(UK:.*?))</a>

which will now output <mpaa>Rated UK:U</mpaa> in the nfo file.

post-4853-0-55166000-1406127314_thumb.png

Edited by dethknite
Link to comment
Share on other sites

 

 

The rating MediaBrowser 3 scraped was "15",

 

Are you 100% sure that was us?  We put the country code in front of ratings like that so it would be something like "GB-15" if we got it.  Or, there is a new bug because this has been working.

 

Putting extra textual information in that tag just seems very wrong to me.  We've been using it for years with nothing but the actual valid rating in it.

Link to comment
Share on other sites

dethknite

I am sure.. I estimate about 10% of movies have invalid data in the movie.xml file that was created with the latest beta version of MediaBrowser 3.

 

see attachement: <ContentRating>15</ContentRating>

 

* There never was extra textual info in the tag used in movie.xml, only in the actual XBMC.nfo file that was scraped from XBMC and MediaCompanion.

post-4853-0-90007200-1406145095_thumb.png

post-4853-0-31822000-1406145544_thumb.png

post-4853-0-90937500-1406145664_thumb.png

Edited by dethknite
Link to comment
Share on other sites

  • 1 month later...
dethknite

I am marking this as still an issue.  I uninstalled MB3 completely, installed the newest beta today.  Let it update all the metadeta with the default settings.. (not storing in xml in media folder.. so it is simply stored in MB3 database).

 

Still have "Rated PG-13 for scenes of...." or "Rated R for violence and nudity..." getting pulled for rating.  So when I set the Kids login to PG Movies for max allowed, and check Block all unrated for all categories... it still displays all the movies and TV shows that have the Rated .... blurb.  As stated before... it seems this is a common rating system out there.  Would be best to parse the "Rated " keyword out as XBMC does and shown above.  Otherwise the parental controls are really a mute point for me unless I go through and manually change the rating for a few thousand movies and shows...

Link to comment
Share on other sites

We simply do not create metadata that looks like that so it has to be coming from somewhere else.  If there are nfo or xml files in the folders with the media we will read them and they will take precedence over any other source. 

 

We also try to read several different fields for this information because different products put it in different fields.  What other metadata products are you using or have you used in the past?

Link to comment
Share on other sites

  • Solution
Deathsquirrel

Easy enough to sort if the source is MBS.  Remove all the metadata files from a movie that you know has this issue.  You can leave the .JPG & .PNGs but lose the rest.  Open MBS, edit that movie, refresh the data.  Look at what MBS creates.  If the problem is coming from some other metadata scraper it won't exist after you do that.

  • Like 1
Link to comment
Share on other sites

dethknite

That is what is occurring.  There are .nfo files in all the folders, most created with Media Companion, and some with XBMC.  I know for fact that MC rips the mpaa tag from IMDB and that includes the "Rated xx ......" blurbs.  I am pretty sure that XBMC rips this as well though, as I have found this document in different places throughout XBMC--XBMC forums, skin developer forums.

 

I suppose one option I have as Deathsquirrel pointed out, is to batch remove all .nfo files from all directories, and then use MB3 to create new ones.  This should fix the ratings for most, but I will have some work going through and fixing unrecognized media. (I have about 30 movies that do not scrape correctly from IMDB or scrape info I wished to override.

 

Thanks ebr for letting me know how the scraping functionality is working so I can better understand how to fix this...

Link to comment
Share on other sites

dethknite

Just thought of an idea... if I create a quick .net tool to recursively go through all the directories and read in the .nfo files, parse them and replace the mpaa tag in the format required for MB3, and then run a full refresh in MB3.. it should pull in the info.

 

Just so I get the format right... does MB3 want it like:  "US:R", "US:PG-13", "UK:15"  or does it have to just be "R", "PG-13", "15"

Edited by dethknite
Link to comment
Share on other sites

dethknite

Excellent.. thanks for pointing me in the right direction.  As a side-note, since scraping international ratings is of the form "UK:15", would "USA:PG-13" work?  I ask this because MediaCompanion does allow scraping the certification tag from IMDB first, which gets everything and uses the mpaa tag as fallback (full text.)  But it only allows either on/off setting for scraping the country code from that cert... so either "R, PG-13, 15, 12, etc." or "USA:R, USA:PG-13, UK:15, etc."  I am going to try to rescrape everything with this setting set to on and hopefully clear out nearly all the mpaa scraped nfo files.

Link to comment
Share on other sites

dethknite

ugh.. this is a pitb... MC scrapes the cert, but adds "Rated " to the beginning anyway.. so it is still putting "Rated USA:R" or "Rated UK:15".

 

I am going to have a really difficult process pulling in new stuff unless MB3 has a way to ignore local mpaa/cert data when updating/refreshing.  Perhaps a simple setting so the MB3 is forced to pull it and process it like it wants it would be great so users that have a collection setup do not have to try to wade through and figure out how every program wishes the data to be formatted.  Maybe a simple "Ignore local certification data" bool.

Link to comment
Share on other sites

dethknite

Awesome.. I found a better tool that works.. but it requires clearing out all my previous saved .nfo data.  Media Center Master.  Thanks for the help everyone on what I format I need to get things in... just sucks that I had to lose all my xbmc .nfo files in the process.  Hopefully this helps others...

Link to comment
Share on other sites

  • 1 month later...

I use MCM for my Metadata, before i add a movie to MBS i first run the MCM and creat a .xlm file. In MCM it show a Score and Rating like 5.7 and R.

Once i add it to MBS and MB updates the .xml file then the next time i open MCM it no longer show the Score or Rating.

 

So it seems Media Center master and Media Browser don't use the same xml tags for these items.

I am currently running Plex and trying MBS, i am looking for the correct settings so every body is happy. I am starting to think i shoud just let MBS store all metadata in it own folder and only use .nfo files so i can keep the .xml for Plex.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...