Kodi Community Forum

Full Version: help id'ing album folder path in a widget
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

The skin I use have widgets and I've just notice that when selecting an album the cdart is not displaying.

It uses a var like so to populate the cdart:

Code:
<variable name="cdARTWidget1Var">
        <!--value condition="Stringcompare(Skin.String(LibraryStructure),1)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Window(home).Property(Label)]\cdart.png</value>
        <value condition="Stringcompare(Skin.String(LibraryStructure),2)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Window(home).Property(Year)] - $INFO[Container(5010).ListItem.Label,,\cdart.png]</value>
        <value condition="Stringcompare(Skin.String(LibraryStructure),3)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Container(5010).ListItem.Label] $INFO[Window(home).Property(Year),(,)\cdart.png]</value>
        <value condition="Stringcompare(Skin.String(LibraryStructure),4)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)] - $INFO[Container(5010).ListItem.Label] $INFO[Window(home).Property(Year),(,)\cdart.png]</value-->
        <value>$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Container(5010).ListItem.folder]\cdart.png]</value>
        <!--value>$INFO[Skin.String(ArtistsLogosPath)]/$INFO[Window(home).Property(Label2)]/$INFO[Window(home).Property(Label)]/cdart.png]</value-->
    </variable>

For reference,

Label is returning - Artist
Label2 is returning - Album name

As you can see I'm playing around to determine what is wrong and the issue I have is putting the actual Album folder name / path into the value. I've checked the wiki etc but couldn't find anything that holds the folder name / path.

I've tried, Listitem.folder, path, but no luck so far.

Anyone know if there is a propery for this and what it is or perhaps another solution to correct this var and have cdart work correctly in the widget?

Thanks,

Mike.
please post code in [ CODE ] tags or on pastebin. Impossible to read it this way.
Sorry Phil,

does that help?

bascially the var is attempting to assign the cdart for the album but where the album name does not match the folder name it fails, so is there a property for either cdart itself or for the album folder name?
where do you try to use it? inside focusedlayout / itemlayout? there stuff like this wont work.
Hi Phil,

It's within the widget and after selecting a focused item, here is the actual xml : Includes_WidgetLayout.xml

With this current VAR settings it is working:

Code:
<variable name="cdARTWidget1Var">
        <value condition="Stringcompare(Skin.String(LibraryStructure),1)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Window(home).Property(Label)]\cdart.png</value>
        <value condition="Stringcompare(Skin.String(LibraryStructure),2)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Window(home).Property(Year)] - $INFO[Container(5010).ListItem.Label,,\cdart.png]</value>
        <value condition="Stringcompare(Skin.String(LibraryStructure),3)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Container(5010).ListItem.Label] $INFO[Window(home).Property(Year),(,)\cdart.png]</value>
        <value condition="Stringcompare(Skin.String(LibraryStructure),4)">$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)] - $INFO[Container(5010).ListItem.Label] $INFO[Window(home).Property(Year),(,)\cdart.png]</value>
        <value>$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Container(5010).ListItem.Label]\cdart.png</value>
        <value>$INFO[Skin.String(ArtistsLogosPath)]$INFO[Window(home).Property(Label2)]\$INFO[Container(5010).ListItem.Label,,\cdart.png]</value>
    </variable>

As shown here:

Image

As stated, this is fine when the actual folder name matches Window(home).Property(Label), which is the album name, but once the folder name differs it fails to obtain the cdart so I was wondering is there an alternative I could use to Window(home).Property(Label) that holds the actual album folder name and just use that which should work everytime?

Mike
nope, there is no alternative.
Thanks for the confirmation Phil.

Mike.