Add MPAA image to movie info [Added to SVN]

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
xaos01 Offline
Junior Member
Posts: 35
Joined: Apr 2009
Reputation: 0
Post: #31
I can't comment on the built in scraper because I use a custom perl script on my Mac to query IMDB to craft an NFO. My script does precisely what you mention; It falls back to certifications if it doesn't have mpaa info and populates the mpaa tag with that instead. If no information exists at all, I put 'NR'.

The rub is for 'PG' and 'PG-13'. It appears to me that IncludesCodecFlagging.xml uses 'Rated PG f' as a hook to determine that a movie is Rated PG; the '<space> f' presumably because for mpaa ratings, the rating is followed by the string 'for this reason and that reason' ie 'Rated PG for scariness and naughty words'. This breaks ratings if the rating was scraped from certifications instead of the mpaa field because certifications don't have a 'reason'. Its just 'PG'.

Any ideas how we could differentiate between PG and PG-13 effectively while still including ratings garnered from the certifications field if mpaa data does not exist?

Also. In version 1.0 of your mod, if I used 'Media Info 2' for my view, I got flags. With version 2.0, I get no flags when using 'Media Info 2'. The fanart view produces flags in both versions. I really dig the 'Media Info 2' view. Any hints on where to look/what changed to get flags back into 'Media Info 2' view?

Platform - AppleTV
AppleTV Version - 3.0.1
Launcher version - 3.2.4
Install Method - Patchstick
SVN Revision - 9.11 R28256
(2)Seritek 5PM Chassis' :: 12TB
(This post was last modified: 2009-12-02 03:20 by xaos01.)
find quote
redtapemedia Offline
UMM Project
Posts: 544
Joined: Mar 2009
Post: #32
xaos01 Wrote:Any ideas how we could differentiate between PG and PG-13 effectively while still including ratings garnered from the certifications field if mpaa data does not exist?

Could use (Pseudocode)

Code:
PG and PG-13

For PG-13

Code:
PG and !PG-13

For PG
find quote
xaos01 Offline
Junior Member
Posts: 35
Joined: Apr 2009
Reputation: 0
Post: #33
Thats a great idea! Unfortunately, I don't know the syntax or even what language is used to look it up. My attempt was to keep 'PG-13' as-is because that string won't ever appear in a 'PG' rating. For 'PG' my failed attempt was:

Code:
<visible>substring(listitem.mpaa,Rated PG) && !substring(listitem.mpaa,Rated PG-13)</visible>

Am I close?

Platform - AppleTV
AppleTV Version - 3.0.1
Launcher version - 3.2.4
Install Method - Patchstick
SVN Revision - 9.11 R28256
(2)Seritek 5PM Chassis' :: 12TB
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,264
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #34
replace && with +

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
xaos01 Offline
Junior Member
Posts: 35
Joined: Apr 2009
Reputation: 0
Post: #35
Works like a champ!

For those that have need for this, heres the code.

Replace:

Code:
[font=Courier New]<control type="image">
    <description>Rated PG</description>
    <width>190</width>
    <height>103</height>
    <aspectratio>keep</aspectratio>
    <texture>flags/mpaa_pg.png</texture>
    <visible>substring(listitem.mpaa,Rated PG f)</visible>
</control>[/font]

With:

Code:
[font=Courier New]<control type="image">
    <description>Rated PG</description>
    <width>190</width>
    <height>103</height>
    <aspectratio>keep</aspectratio>
    <texture>flags/mpaa_pg.png</texture>
    <visible>substring(listitem.mpaa,Rated PG) + !substring(listitem.mpaa,Rated PG-13)</visible>
</control>[/font]

Platform - AppleTV
AppleTV Version - 3.0.1
Launcher version - 3.2.4
Install Method - Patchstick
SVN Revision - 9.11 R28256
(2)Seritek 5PM Chassis' :: 12TB
find quote
redtapemedia Offline
UMM Project
Posts: 544
Joined: Mar 2009
Post: #36
Glad it worked Smile
find quote
Sranshaft Online
Posting Freak
Posts: 1,335
Joined: Dec 2008
Reputation: 19
Location: Melbourne, Australia
Post: #37
IMDb recently changed a few things in their coding. The scraper may need to be updated to reflect this.
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,264
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #38
migueld Wrote:Yes by all means feel free to use them Smile

I added slightly modded versions of these to the svn just now thanks again
P.S. sorry I forgot to mention your name in the changelog

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
xboxmedia Offline
Junior Member
Posts: 39
Joined: Nov 2009
Reputation: 0
Post: #39
I am having trouble getting this too work. The studio icons show up on about half the movies I have... didn't expect em to show up for all.

However, none of the movies have the rating show up. How should I fix this?

Also, is there a way I can add a lions gate images to the flags for lions gate movies? (and others eventually)
find quote
Smeezy101 Offline
Junior Member
Posts: 25
Joined: Aug 2009
Reputation: 0
Post: #40
xboxmedia Wrote:I am having trouble getting this too work. The studio icons show up on about half the movies I have... didn't expect em to show up for all.

However, none of the movies have the rating show up. How should I fix this?

Also, is there a way I can add a lions gate images to the flags for lions gate movies? (and others eventually)

I'm also having the same problem. With three young kids in the house, it sure would be nice to have the MPAA rating displayed. Smile
find quote