Solved Aeon MQ5 - MPAA comparison for UK w/o substring?
#1
Hi all,

An user of our mediamanager had the following issue, that the MPAA certification for UK is not displayed.
In our NFO we can have multiple certifications like "UK:15 / GB:15 / DE:FSK16".

I checked the IncludesVariables.xml, and for every language you do a substring search EXCEPT FOR UK!
Is this on purpose?
Or could you change that to substring search as well?

<value condition="StringCompare(ListItem.Mpaa,UK:15)">flags/mpaa/BBFC_15_Certificate_UK.png</value>
vs
<value condition="SubString(ListItem.Mpaa,TV-14)">flags/mpaa/TV-14_Certificate_US.png</value>

brgds

PS
great skin, btw Smile
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
Reply
#2
This is necessary to avoid which is shown wrong flag, but is applicable only in this case, I think:

<value condition="StringCompare(ListItem.Mpaa,UK:12)">flags/mpaa/BBFC_12_Certificate_UK.png</value>
<value condition="StringCompare(ListItem.Mpaa,UK:12A)">flags/mpaa/BBFC_12A_Certificate_UK.png</value>

If you use SubString the skin will show the first flag for both conditions.
------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
Reply
#3
ok, is the "UK:12" the only "duplicate"?
Could you change all the others to use substring?! (including 12a)
should have no impact....?

maybe use both (if possible);
<value condition="StringCompare(ListItem.Mpaa,UK:12)">flags/mpaa/BBFC_12_Certificate_UK.png</value>
<value condition="SubString(ListItem.Mpaa,UK:12 )">flags/mpaa/BBFC_12_Certificate_UK.png</value>
(Note the space!)
And yes, wont work in every case, but... Smile
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
Reply
#4
(2013-11-28, 20:31)MarcosQui Wrote: This is necessary to avoid which is shown wrong flag, but is applicable only in this case, I think:

<value condition="StringCompare(ListItem.Mpaa,UK:12)">flags/mpaa/BBFC_12_Certificate_UK.png</value>
<value condition="StringCompare(ListItem.Mpaa,UK:12A)">flags/mpaa/BBFC_12A_Certificate_UK.png</value>

If you use SubString the skin will show the first flag for both conditions.

Variables stop when the first condition is met, so if you do a substring on UK:12A first and then on UK:12 it will work correctly.

nvm thats only correct in half the cases, this should work though:
Code:
<value condition="SubString(ListItem.mpaa,UK:12) + !SubString(ListItem.mpaa,UK:12A)">BBFC_12_Certificate_UK</value>
<value condition="SubString(ListItem.mpaa,UK:12A)">BBFC_12A_Certificate_UK</value>
Reply
#5
Yes, that's correct. I'll make the necessary changes.
------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
Reply
#6
Great Smile
Thank you both.
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Aeon MQ5 - MPAA comparison for UK w/o substring?0