Show rating of movies in media flags!
#1
Hello Everyone,

I was annoyed by the fact that there was no way to see the IMDB rating of a movie without having to order them by rating. I like to order my movies by title, but I also wan't to see the IMDB rating. I saw this question popping by multiple times on this forum, so I started looking into the code. I found a solution to show the score like this:
Image

As you can see in the bottom right corner, left to the quality, it now shows the rating of a movie! Unfortunately, I was unable to add the text "Rating" or what so ever.
Here's what you have to do to get the rating if you have installed Kodi on a PC:
1. Open the includes.xml file located in C:\Program Files (x86)\Kodi\addons\skin.estuary\xml\ or C:\Program Files\Kodi\addons\skin.estuary\xml\ depending on your OS.
2. Edit this file with Notepad (or Notepad++)
3. Go to line 414 (just after this:
Code:
            <include content="MediaFlag">
                <param name="texture" value="$INFO[ListItem.AudioChannels,flags/audiochannel/,.png]" />
                <param name="visible" value="!String.IsEmpty(ListItem.AudioChannels)" />
            </include>
            <include content="MediaFlag">
                <param name="texture" value="$INFO[ListItem.AudioCodec,flags/audiocodec/,.png]" />
                <param name="visible" value="!String.IsEmpty(ListItem.AudioCodec)" />
            </include>

and insert the following code after that:
Code:
            <control type="group">
                <width>115</width>
                <visible>!String.IsEmpty(ListItem.Rating)</visible>
                <control type="label">
                    <width>115</width>
                    <height>60</height>
                    <align>center</align>
                    <aligny>center</aligny>
                    <label>$INFO[ListItem.Rating]</label>
                    <font>font_flag</font>
                </control>
                <include content="MediaFlag">
                    <param name="texture" value="flags/flag.png" />
                </include>
            </control>

Restart Kodi and this should do the trick!
It would be very nice if the developer(s) of the skin would add this option by default Smile
Reply
#2
Hey Miicker, you can change:

Code:
<label>$INFO[ListItem.Rating]</label>

to:

Code:
<label>IMDB: $INFO[ListItem.Rating]</label>

Then the label will show some text.
Reply
#3
(2017-05-25, 23:22)miicker Wrote: Hello Everyone,

I was annoyed by the fact that there was no way to see the IMDB rating of a movie without having to order them by rating. I like to order my movies by title, but I also wan't to see the IMDB rating. I saw this question popping by multiple times on this forum, so I started looking into the code. I found a solution to show the score like this:
Image

As you can see in the bottom right corner, left to the quality, it now shows the rating of a movie! Unfortunately, I was unable to add the text "Rating" or what so ever.
Here's what you have to do to get the rating if you have installed Kodi on a PC:
1. Open the includes.xml file located in C:\Program Files (x86)\Kodi\addons\skin.estuary\xml\ or C:\Program Files\Kodi\addons\skin.estuary\xml\ depending on your OS.
2. Edit this file with Notepad (or Notepad++)
3. Go to line 414 (just after this:
Code:
            <include content="MediaFlag">
                <param name="texture" value="$INFO[ListItem.AudioChannels,flags/audiochannel/,.png]" />
                <param name="visible" value="!String.IsEmpty(ListItem.AudioChannels)" />
            </include>
            <include content="MediaFlag">
                <param name="texture" value="$INFO[ListItem.AudioCodec,flags/audiocodec/,.png]" />
                <param name="visible" value="!String.IsEmpty(ListItem.AudioCodec)" />
            </include>

and insert the following code after that:
Code:
            <control type="group">
                <width>115</width>
                <visible>!String.IsEmpty(ListItem.Rating)</visible>
                <control type="label">
                    <width>115</width>
                    <height>60</height>
                    <align>center</align>
                    <aligny>center</aligny>
                    <label>$INFO[ListItem.Rating]</label>
                    <font>font_flag</font>
                </control>
                <include content="MediaFlag">
                    <param name="texture" value="flags/flag.png" />
                </include>
            </control>

Restart Kodi and this should do the trick!
It would be very nice if the developer(s) of the skin would add this option by default Smile

you can change the image with the kodi texture tool add this in the flag folder and change flag.png to imdbflag.pngImage
upload photo album online Image
Reply
#4
Thanks for this. I need help to add mpaa rating also on this, I managed to get this done by ListItem.mpaa but it shows Rated R, Rated PG and Rated G. Is there anyway to remove the Rated from showing. I just wanted to show R, PG, PG-13 and so on
Reply
#5
(2017-06-15, 22:10)enigmaa Wrote: Thanks for this. I need help to add mpaa rating also on this, I managed to get this done by ListItem.mpaa but it shows Rated R, Rated PG and Rated G. Is there anyway to remove the Rated from showing. I just wanted to show R, PG, PG-13 and so on

You can use a variable like that to define your mpaa :

Code:
<variable name="MpaaVar">
    <value condition="String.IsEqual(ListItem.mpaa,Rated R)">R</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated PG-13)">PG-13</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated G)">G</value>
      etc....
    <value>ListItem.mpaa</value>
</variable>

And use <label>$VAR[MpaaVar]</label>
 Estuary MOD V2 
Reply
#6
Thanks .. much appreciated. I have added the below and now it shows much better.
Variable.xml
<variable name="MpaaVar">
<value condition="String.IsEqual(ListItem.mpaa,Rated NC-17)">NC-17</value>
<value condition="String.IsEqual(ListItem.mpaa,Rated R)">R</value>
<value condition="String.IsEqual(ListItem.mpaa,Rated PG-13)">PG-13</value>
<value condition="String.IsEqual(ListItem.mpaa,Rated PG)">PG</value>
<value condition="String.IsEqual(ListItem.mpaa,Rated G)">G</value>
<value condition="String.IsEqual(ListItem.mpaa,A)">A</value>
<value condition="String.IsEqual(ListItem.mpaa,UA)">UA</value>
<value condition="String.IsEqual(ListItem.mpaa,U)">G</value>
<value condition="String.IsEqual(ListItem.mpaa,not rated)">NR</value>
<value condition="String.IsEqual(ListItem.mpaa,TV-MA)">MA</value>
<value condition="String.IsEqual(ListItem.mpaa,TV-G)">G</value>
<value condition="String.IsEqual(ListItem.mpaa,TV-PG)">PG</value>
<value condition="String.IsEqual(ListItem.mpaa,TV-14)">14</value>
<value condition="String.IsEqual(ListItem.mpaa,TV-Y)">Y</value>
<value condition="String.IsEqual(ListItem.mpaa,TV-Y7)">Y7</value>
<value>ListItem.mpaa</value>
</variable>

Include.xml
<control type="group">
<width>115</width>
<visible>!String.IsEmpty(ListItem.mpaa)</visible>
<control type="label">
<width>115</width>
<height>60</height>
<align>center</align>
<aligny>center</aligny>
<label>$VAR[MpaaVar]</label>
<font>font_flag</font>
</control>
<include content="MediaFlag">
<param name="texture" value="flags/flag.png" />
</include>
</control>
Reply
#7
Code:
<variable name="MpaaVar">
    <value condition="String.IsEqual(ListItem.mpaa,Rated NC-17)">[B][COLOR=red]NC-17[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated R)">[B][COLOR=red]R[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated PG-13)">[B][COLOR=fuchsia]PG-13[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated PG)">[B][COLOR=fuchsia]PG[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated G)">[B][COLOR=lime]G[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,A)">[B][COLOR=red]A[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,UA)">[B][COLOR=fuchsia]UA[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,U)">[B][COLOR=lime]G[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,not rated)">[B][COLOR=gray]NR[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,TV-MA)">[B][COLOR=red]MA[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,TV-G)">[B][COLOR=lime]G[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,TV-PG)">[B][COLOR=fuchsia]PG[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,TV-14)">[B][COLOR=red]14[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,TV-Y)">[B][COLOR=lime]Y[/COLOR][/B]</value>
    <value condition="String.IsEqual(ListItem.mpaa,TV-Y7)">[B][COLOR=lime]Y7[/COLOR][/B]</value>
    <value>ListItem.mpaa</value>
</variable>
[/quote]
Reply
#8
(2017-06-15, 22:43)Guilouz Wrote:
(2017-06-15, 22:10)enigmaa Wrote: Thanks for this. I need help to add mpaa rating also on this, I managed to get this done by ListItem.mpaa but it shows Rated R, Rated PG and Rated G. Is there anyway to remove the Rated from showing. I just wanted to show R, PG, PG-13 and so on

You can use a variable like that to define your mpaa :

Code:
<variable name="MpaaVar">
    <value condition="String.IsEqual(ListItem.mpaa,Rated R)">R</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated PG-13)">PG-13</value>
    <value condition="String.IsEqual(ListItem.mpaa,Rated G)">G</value>
      etc....
    <value>ListItem.mpaa</value>
</variable>

And use <label>$VAR[MpaaVar]</label>

Hi
What is required to get the default MPAA displayed if the above condition is not met. I have some with UK and other rating which is difficult to add.
Reply
#9
Hi All,
Is there anyway i can show mpaa rating images instead of text for the above. I can download the mpaa rating image .. but how do i get this displayed. Appreciate your help
https://en.wikipedia.org/wiki/Motion_pic...ing_system
Reply
#10
Rainbow 
Dear All,
I have managed to get that working.

<value condition="String.IsEqual(ListItem.mpaa,Rated NC-17)">mpaa/rating-nc17.png</value> in variable.xml

and below in include.xml
<include content="MediaFlag">
<param name="texture" value="$VAR[MpaaVar]" />
<param name="visible" value="!String.IsEmpty(ListItem.mpaa)" />
</include>
Then injecting all the image file in textures.xbt with texture.kodi application.

I need advise on one issue.

<value condition="String.IsEqual(ListItem.mpaa,Australia:MA15+)">mpaa/australia_ma.png</value>
<value condition="String.IsEqual(ListItem.mpaa,Australia:R18+)">mpaa/australia_x.png</value>

both the above condition is not working. Seems the + character is not getting recognized, How do i get this working.
Reply
#11
This has added ratings for TV Shows, but not Movies for me. Any ideas?
Reply
#12
In my case I only see the new rating mediaflag when I order by rating...

Any suggestions?
Reply

Logout Mark Read Team Forum Stats Members Help
Show rating of movies in media flags!0