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: 551
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,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #34
replace && with +
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: 551
Joined: Mar 2009
Post: #36
Glad it worked Smile
find quote
Sranshaft Offline
Posting Freak
Posts: 1,424
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #37
IMDb recently changed a few things in their coding. The scraper may need to be updated to reflect this.

[Image: all-thin-fanart.jpg]
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
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
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
kizer Offline
Fan
Posts: 701
Joined: Jul 2008
Reputation: 0
Location: Seattle WA, US
Post: #41
I'm going a little bonkers here. I was trying to add the media flags and/or the ratings to the Media View One layout simply because I like it. Wink

I found this part of the code which seems to show it.
Code:
<posy>200</posy>
                    <visible>!Skin.HasSetting(VideoLibraryFanartView504)</visible>
                    <control type="grouplist">
                        <description>Media Codec Flagging Images</description>
                        <posx>0</posx>
                        <posy>170</posy>
                        <width>600</width>
                        <align>left</align>
                        <itemgap>0</itemgap>
                        <orientation>horizontal</orientation>
                        <include>VideoCodecFlaggingConditions</include>
                        <include>AudioCodecFlaggingConditions</include>
                        <include>AspectCodecFlaggingConditions</include>
                        <include>VideoTypeHackFlaggingConditions</include>            
                        <include>StudioFlaggingConditions</include>

But when I add the <include>StudioFlaggingConditions</include> it seems to put it on a separate line opposed to next to everything else. I don't have my machine up right now or I'd try and give you a screen shot.
find quote
dhrandy Offline
Senior Member
Posts: 101
Joined: Jul 2006
Reputation: 1
Location: Concord, NC
Post: #42
kizer Wrote:I'm going a little bonkers here. I was trying to add the media flags and/or the ratings to the Media View One layout simply because I like it. Wink

I found this part of the code which seems to show it.


But when I add the <include>StudioFlaggingConditions</include> it seems to put it on a separate line opposed to next to everything else. I don't have my machine up right now or I'd try and give you a screen shot.

You probably need to make the width larger and will have to adjust the y.

Quote:<posy>170</posy>
<width>600</width>

HTPC= AMD Athlon X2 BE-2350 l Gigabyte GA-MA78GM-S2H 780G l G Skill 2GB l HVR-1800 l PVR-150 l Ultra MicroFly Case l 180GB SATA l 250GB IDE
Old HTPC Build / Current 780G HTPC Build / My Website
find quote
kizer Offline
Fan
Posts: 701
Joined: Jul 2008
Reputation: 0
Location: Seattle WA, US
Post: #43
Thanks dhrandy.

I'm by far not a skinner, more like a tinker and often I just change things here and there until well I see something changed. I'll give it a whirl.
find quote
migueld Offline
Fan
Posts: 361
Joined: Sep 2008
Reputation: 2
Post: #44
It seems that G ratings are not showing up, tested on SVN 25712.
find quote
migueld Offline
Fan
Posts: 361
Joined: Sep 2008
Reputation: 2
Post: #45
Some movies aren't display ratings, Back to the Future, Batman 1989. Also the ratings NR and G aren't showing up... anyone else seeing this?
find quote