Kodi Community Forum

Full Version: [QUESTION] Genre Icons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright so lets say I want a specific icon per-genre. Action>action.png and so on, as this seems to be something I have to code in and I can't find really any info on it in the wiki, and some sporadic info here on the forums anyone know 100% how to add specific images to the genres in library mode?

Regards,

Adam
Couldn't you do <texture>$INFO[ListItem.Label].png</texture> or something?
Have tried the following:

Quote: <control type="image">
<posx>40</posx>
<posy>18</posy>
<width>64</width>
<height>64</height>
<texture>moviegenres\$INFO
[Listitem.label].png</texture>
<visible>Container.Content(Genres)</visible>
</control>

In our commonview.xml and nothing changes.
XBMCG33K Wrote:Have tried the following:



In our commonview.xml and nothing changes.
maybe something like that?
Quote:<control type="image">
<posx>40</posx>
<posy>18</posy>
<width>64</width>
<height>64</height>
<texture>moviegenres/action.png</texture>
<visible>Container.Content(Genres) + substring(ListItem.Label,action) </visible>
</control>
or:
Quote:<control type="image">
<posx>40</posx>
<posy>18</posy>
<width>64</width>
<height>64</height>
<texture>$INFO
[Listitem.label,moviegenres/,.png]</texture>
<visible>Container.Content(Genres)</visible>
</control>
I must really be missing something as none of these are working for me currently. I know i'm working with the right xml I want these to show in but still nothings showing.
It's not the forward slash is it?

Or try this -
PHP Code:
<control type="image">
<
posx>40</posx>
<
posy>18</posy>
<
width>64</width>
<
height>64</height>
<
texture>moviegenres/$INFO[ListItem(0).Label].png</texture>
<
visible>Container.Content(Genres)</visible>
</
control
Great! That worked! But now when I select lets say comedy, it actually reverts back to the default thumb? Is there a way to prevent that?
Sounds like the <focusedlayout> is different?
XBMCG33K Wrote:Great! That worked! But now when I select lets say comedy, it actually reverts back to the default thumb? Is there a way to prevent that?
Of course, the other problem is matching the image name to to actual scraped genre.
If you're using the default scraper (TMDB) then each genre will have 'film' after them.

EDIT: Can we pull a set number of characters from the genre? If so, we could set it to the first 5 characters so XBMC is only looking for 'comed', 'roman', etc as a match.
jmarshall Wrote:Sounds like the <focusedlayout> is different?

Here is the code I have so far:

Code:
<!-- Thumb left side -->
                                        <control type="image">
                                                <posx>40</posx>
                                                <posy>18</posy>
                                                <width>64</width>
                                                <height>64</height>
                                                <texture background="true">$INFO
[ListItem.Thumb]</texture>
                                                <aspectratio>keep</aspectratio>
                                                <fadetime>300</fadetime>
                                                <visible>!IsEmpty(ListItem.Thumb)</visible>
                                        </control>
                                        <control type="image">
                                                <posx>40</posx>
                                                <posy>18</posy>
                                                <width>64</width>
                                                <height>64</height>
                                                <texture>$INFO
[ListItem.ActualIcon]</texture>
                                                <aspectratio>keep</aspectratio>
                                                <fadetime>300</fadetime>
                                                <visible>IsEmpty(ListItem.Thumb)</visible>
                                        </control>
                                      <control type="image">
                        <posx>40</posx>
                        <posy>18</posy>
                        <width>64</width>
                        <height>64</height>
                        <texture>moviegenres\$INFO
[ListItem(0).Label].png</texture>
                        <visible>Container.Content(Genres)</visible>
                    </control>  
                                        <control type="image">
                                                <posx>15</posx>
                                                <posy>15</posy>
                                                <width>950</width>
                                                <height>1</height>
                                                <texture>views\list\Other\List_Line.png</texture>
                                        </control>
                                </itemlayout>
                                <focusedlayout height="70">
                                        <control type="image">
                                                <posx>20</posx>
                                                <posy>15</posy>
                                                <width>940</width>
                                                <height>70</height>
                                                <texture>views\list\Other\List_Fo.png</texture>
                        <aspectratio>Stretch</aspectratio>
                                        </control>

The focused layout continues from there, is this as simple as moving the code provided by Hitcher above?

Hitcher Wrote:Of course, the other problem is matching the image name to to actual scraped genre.
If you're using the default scraper (TMDB) then each genre will have 'film' after them.

I have had to make comedy.png and comedy film.png and so on for each one now because of this.