Win How do I add IMDB ratings in the list?
#1
I've had the Amber theme for a few days now and I've been enjoying it immensely. But being the tweaker that I am, I've also been diving into the XML files to make changes to fit my tastes perfectly. One I'm having trouble with, however, is adding IMDB ratings next to all the titles in the LowList view. To show you what I mean, here a picture stolen from another thread from someone who did what I'm looking for in Transparency:

Image

So far I've learned that the list layout is found in "View_50.xml", so that's what I need to edit. I'm very inexperienced with writing code, but I know the basics decently well. I've tried plugging variations of this into different parts of that file, but so far to no avail:

Code:
<control type="label" description="IMDB Ratings">
    <posx>25</posx>
    <posy>0</posy>
    <width>900</width>
    <height>72</height>
    <scroll>false</scroll>
    <font>ListDetails</font>
    <textcolor>Highlight</textcolor>
    <align>right</align>
    <aligny>center</aligny>
    <label>$INFO[ListItem.Rating]</label>
</control>

So to you more experienced coders out there, am I anywhere in the ballpark? This seems like a doable tweak, how do I make this work?
Reply
#2
After a little while longer of tinkering, I finally figured it out. If anyone else wants to accomplish this, here's how I did it:

As I said before, "View_50.xml" is the file that needs editing. This line will appear in two places in that file:

Code:
<control type="label" description="Main Label">
   <posx>589</posx>
   <height>72</height>
   <width>520</width>
   <scroll>false</scroll>
   <label>$INFO[ListItem.Label]</label>
</control>

In BOTH of those places, put this line directly underneath:

Code:
<control type="label" description="IMDB Ratings">
   <posx>52r</posx>
   <posy>0</posy>
   <width>40</width>
   <height>72</height>
   <font>ListDetails</font>
   <textcolor>Highlight</textcolor>
   <aligny>center</aligny>
   <label>$INFO[ListItem.Rating]</label>
</control>

And here's the final result (this works for the normal list view as well):

Image

The only thing I have left to do is hide the ratings for individual TV episodes (a personal preference thing). So does anyone know how I can accomplish that?
Reply
#3
Where exactly is the xml file I looked but cant seem to find it.
Reply
#4
In the same code, please add visibility conditions. That will do the trick.

Read more from here List of boolean conditions

Also, seems like the rating overlaps the "watched flag" which perhaps you haven't turned on. Moving it bit to the right helps neatly. Here is the revised snippet.

Code:
    <control type="label" description="IMDB Ratings">
       <posx>100r</posx>
       <posy>0</posy>
       <width>40</width>
       <height>72</height>
       <font>ListDetails</font>
       <textcolor>Highlight</textcolor>
       <aligny>center</aligny>
       <label>$INFO[ListItem.Rating]</label>
       <visible>[Container.Content(movies) | container.content(sets)]</visible>
    </control>
Reply
#5
Yeah, I never cared for the watched flag, so that was one of the first things I turned off in the skin. Anyone who wants both should use garbokawa's posx value, because it does clean it up very nicely.

Also, your visibility conditions didn't quite accomplish what I was looking for, as I wanted the TV show ratings, but not the individual episodes themselves. Luckily with the link you gave me, this was very easy to accomplish! So here's the updated (and likely final) code:


Code:
<control type="label" description="IMDB Ratings">
   <posx>100r</posx>
   <posy>0</posy>
   <width>40</width>
   <height>72</height>
   <font>ListDetails</font>
   <textcolor>Highlight</textcolor>
   <aligny>center</aligny>
   <label>$INFO[ListItem.Rating]</label>
   <visible>[Container.Content(movies) | container.content(sets) | container.content(tvshows)]</visible>
</control>

Thanks for the help garbokawa!
Reply
#6
(2015-05-14, 11:45)peterockone Wrote: Where exactly is the xml file I looked but cant seem to find it.

The file is in the 1080i folder in the skin directory, which in Windows is located in %userprofile%\AppData\Roaming\Kodi\addons\ .
Reply
#7
How about on android. .
Reply
#8
And to the author of this skin, if you could add this feature or make it toggleable, that would be fantastic. I'm noticing that the skin gets updated quite frequently, which I appreciate, but it also means I'll have to manually add these lines of code every time an update comes through. A minor nuisance, but if it's incorporated into the skin itself it would be great. Feel free to use my code if you'd like (not that it's that complex).
Reply

Logout Mark Read Team Forum Stats Members Help
How do I add IMDB ratings in the list?0