[Modification] Australian OFLC Ratings for Aeon
#16
i tried to use the certification method but it doesn't read

Tried to use MIP to move the certification field to the Mpaa field but the process described (using auto pilot) just downloads the information from IMDB again.

happy to try any other ideas (i tried to read the myvideo DB but not sure how to)
Reply
#17
It shouldn't download anything from IMDB - the process (from memory - I'm at work) should be tick the box above the scan media only and then hit the scan media only button - I'm sure I had the IMDB Aus ratings swap from .certification to .mpaa automatically with that method in autopilot. I was using the most recent version of MIP. I hope it works for you.

Maybe fekker could tell us if he sees this thread how he programmed it to work.
Reply
#18
Also, does anyone know how we can read from the certification field in a .nfo through skin xml files?
Is it close to substring(listitem.certification,Australia:G)?
Reply
#19
K-FleX Wrote:Also, does anyone know how we can read from the certification field in a .nfo through skin xml files?
Is it close to substring(listitem.certification,Australia:G)?

Try string(listitem.certification,Australia:G), I got it to work this morning, I think the issue is we are trying to look for part of a string whereas the whole string is "Australia:G". I'll do a bit more testing tonight but I think this will be an issue where multiple ratings are scraped (I think the back to the future movies are like this) for example "Australia:M / Australia:M / AustraliaTongueG". I have a couple of movies like this. The solution might be to take out any multiple ratings so there's only one.
Reply
#20
Nice work redtape! I had this with that problem with the mpaa ones too. The png overlays each other. I posted it in the bugs thread last week but that has been cleaned up now.

The solution should be replacing the ratings with AND NOTS (+ !) of the other ratings:

Code:
<visible>string(listitem.certification,Australia:G) + !string(listitem.certification,Australia:PG) + !string(listitem.certification,Australia:M) + !string(listitem.certification,Australia:MA) + !string(listitem.certification,Australia:R)</visible>

Code:
<visible>string(listitem.certification,Australia:PG) + !string(listitem.certification,Australia:M) + !string(listitem.certification,Australia:MA) + !string(listitem.certification,Australia:R)</visible>

Code:
<visible>string(listitem.certification,Australia:M) + !string(listitem.certification,Australia:MA) + !string(listitem.certification,Australia:R)</visible>

Code:
<visible>string(listitem.certification,Australia:MA) + !string(listitem.certification,Australia:R)</visible>

Code:
<visible>string(listitem.certification,Australia:R)</visible>

The above is for if you want the lowest rating in the field to be displayed. For the highest available to be displayed you would reverse it:

Code:
<visible>string(listitem.certification,Australia:R) + !string(listitem.certification,Australia:MA) + !string(listitem.certification,Australia:M) + !string(listitem.certification,Australia:PG) + !string(listitem.certification,Australia:G)</visible>

Code:
<visible>string(listitem.certification,Australia:MA) + !string(listitem.certification,Australia:M) + !string(listitem.certification,Australia:PG) + !string(listitem.certification,Australia:G)</visible>

Code:
<visible>string(listitem.certification,Australia:M) + !string(listitem.certification,Australia:PG) + !string(listitem.certification,Australia:G)</visible>

Code:
<visible>string(listitem.certification,Australia:PG) + !string(listitem.certification,Australia:G)</visible>

Code:
<visible>string(listitem.certification,Australia:G)</visible>
Reply
#21
edit: ***** disregard all of this... I'm wrong and none of it works...

In the case where there are multiple ratings I think you'd have to look at the substring. For example, if there are three movies:

Movie 1:
Certification string is "Australia:M"

Movie 2:
Certification string is "Australia:M / Australia:MA"

Movie 3:
Certification string is "Australia:M for sex drugs & rock n roll"

If you are looking for the substring "Australia:M" you would find it for movie 2, but not for movie 1 as it's the entire string, not a substring. You would also find it in movie 3. Maybe you could initially look for the string and then use the code you talked about above for comparing at a substring level?
Reply
#22
I've been working on sorting out some code to display the rating in the "narrow" style. I've taken a screenshot: http://www.flickr.com/photos/24904773@N07/3444658828/

I'll post some details if anyone's interested, but I'm going to try and code it so it dynamically sizes everything. For the moment I've had to edit the background image with all the lines for the various sections etc.

And I've encountered a problem with the "string" method... It overlays all the ratings on top of each other regardless of the text in the certification field (in my initial testing I only put in the code for one rating)... ack... back to square one...
Reply
#23
mmm...I'm reformatting the machine that has my xbmc on it so I can't have a go myself. Why don't you try replacing the string sections with substring 'ustralia:M' or simply ':M'?

Let me know if that works bud. I'd really love your code for it...
Reply
#24
K-FleX Wrote:mmm...I'm reformatting the machine that has my xbmc on it so I can't have a go myself. Why don't you try replacing the string sections with substring 'ustralia:M' or simply ':M'?

Let me know if that works bud. I'd really love your code for it...

I don't think we're going to be able to grab anything from the certification field. If you look at http://wiki.xbmc.org/?title=InfoLabels there is no mention of the certification field, but you can see many others (listitem.mpaa, listitem.Studio etc...). I think the only solutions are going to be to make a request to the XBMC team or to use the mpaa field...

http://wiki.xbmc.org/?title=List_of_Boolean_Conditions shows that string is not a boolean condition, stringcompare(info,string) is the correct condition. Also, substring(info,string,[Left or Right]) might be useful to us...
Reply
#25
Nice job finding those - I did a google search but came across nothing.

I guess we're lucky the mpaa field switching has been implemented in MIP then.

I might hold off before trying any more certification mods - I want to wait until the new list view is added (a smaller grey rating would look sweet next to each listitem) + with all the Aeon updates + Mod Pack updates it's getting to be too much like hard work to keep changing the xml files.
Reply
#26
K-FleX Wrote:Nice job finding those - I did a google search but came across nothing.

I guess we're lucky the mpaa field switching has been implemented in MIP then.

I might hold off before trying any more certification mods - I want to wait until the new list view is added (a smaller grey rating would look sweet next to each listitem) + with all the Aeon updates + Mod Pack updates it's getting to be too much like hard work to keep changing the xml files.

Yeah, but maybe we might be able to convince DJH to include some of this stuff in the actual skin? I was thinking if we can use an include that way all the code is in a separate file. It would then be easy to implement a file for other countries even... the tricky part will be figuring out a way to dynamically resize the image area for different sized rating images... I have a few ideas on how to go about it so hopefully I can get one of them to work... Wink
Reply
#27
Eureka!!

I've figured out some code that can adjust the position of the dividers and the year / genre text depending of what width you want the classification image. The bonus is it can do it on a per movie basis.

So for example if you have a narrow images for your OFLC ratings it will shift the year, genre text and dividers to the left to compensate, but leave them in place if a movie has an MPAA rating.

I'm trying to work out a way to implement the code with a minimum amount of editing so that others can easily modify their installation. I'll probably post it in a separate thread when I'm done, because you could use it for other international ratings too.
Reply
#28
Nice work redtape, looking forward to it...will be sweet if it is only a one line include in the existing xml files.
Reply
#29
K-FleX Wrote:Nice work redtape, looking forward to it...will be sweet if it is only a one line include in the existing xml files.

Not quite... it's up anyway. Wink
Reply
#30
K-FleX Wrote:It shouldn't download anything from IMDB - the process (from memory - I'm at work) should be tick the box above the scan media only and then hit the scan media only button - I'm sure I had the IMDB Aus ratings swap from .certification to .mpaa automatically with that method in autopilot. I was using the most recent version of MIP. I hope it works for you.

Maybe fekker could tell us if he sees this thread how he programmed it to work.

using MIP build 2861 trying both with and without the check box I don't get the certification field copied to the mpaa field. It does how ever copy the skin tag field into the studio field

eg

before
studio: Eon Productions
skin tag: Eon Productions / 480p / XVID / AC-3 / 2ch /

after
studio: Eon Productions / 480p / XVID / AC-3 / 2ch /
skin tag: Eon Productions / 480p / XVID / AC-3 / 2ch /

damn shame
Reply

Logout Mark Read Team Forum Stats Members Help
[Modification] Australian OFLC Ratings for Aeon0