InfoLabels in "fallback".
#1
Hi,
I'm modding confluence for some custom icons. (e.g. genre-icons)
I changed in ViewFileMode.xml:
Code:
<texture background="true">$INFO[ListItem.Icon]</texture>
to
Code:
<texture background="true" fallback="$INFO[ListItem.Icon]">$INFO[ListItem.Label,custom/,.png]</texture>
... but the fallback doesn't work.
It works with "hardcoded" filenames (e.g. DefaultFolder.png), but that doesn't cover everything.
Can't I use lables as attributes?
Here you can see an example, there is no year.png, so it still displays the actor icon (which I had to copy as Actors.png to custom folder) -or nothing- instead of showing DefaultFolder.png from fallback.
Image

... or is there any boolean condition for the visible-tag which checks if a file exists? (or something I could use)
thanks in advance
f
freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
Reply
#2
i get the feeling you're making things more difficult than you should.

if all you want is custom genre icon, use this code:
Code:
<texture background="true" fallback="genre-fallback.png">$INFO[ListItem.Label,custom/,.png]</texture>
<visible>substring(Container.FolderPath,videodb://1/1/)</visible>
the visible condition will make sure they only show up inside the genre node.

for all the other icons, use the regular code and exclude them from the genre node:
Code:
<texture background="true">$INFO[ListItem.Icon]</texture>
<visible>!substring(Container.FolderPath,videodb://1/1/)</visible>

if you want to change any of the DefaultFoo.png icons
just replace the onces from Confluence with your own them and rebuild Textures.xbt


but to answer your question, no you can't use $INFO[] labels as fallback.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Thanks, that helped a lot.
I thought it would be an easy way, to have custom images for certain "strings", but it only makes sense with a "dynamic fallback".
I was already thinking about some substring to filter, but didn't know much about the db-nodes, so thanks again. This is a better and more precise way.

Other questions:
Is there any way to get the addons (real)reponame?
Container.Property(reponame) doesn't work this way, because it shows the "intern" name.

And can I prepare strings before using/printing them?
e.g. <label>substr(STRING, 1,4)</label> to get charakter 1-4... or something like this? (I need to get the month out of system.date or even better the numerical value 1-12)
freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
Reply
#4
freaksworth Wrote:Other questions:
Is there any way to get the addons (real)reponame?
Container.Property(reponame) doesn't work this way, because it shows the "intern" name.
why not just use ListItem.Label ?
or maybe Container(id).ListItem.Label

freaksworth Wrote:And can I prepare strings before using/printing them?
e.g. <label>substr(STRING, 1,4)</label> to get charakter 1-4... or something like this? (I need to get the month out of system.date or even better the numerical value 1-12)

nope, you can't alter strings.
you can use visible conditions though...

<label>11</label>
<visible>substring(system.date,$LOCALIZE[31])</visible>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
InfoLabels in "fallback".0