Kodi Community Forum

Full Version: ListItem.Content...?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm finding that the existing icon system in XBMC isn't quite doing what I need it to. I want to use text to illustrate what a listitem represents and there doesn't seem to be a way of doing it as there are no conditionals for listitem contents. So what I'd need is something like:

<visible>ListItem.Content(folder)</visible>

Is it possible?

To illustrate, how would I do this while ensuring that a) I can retain strings.xml support, and b) the correct label shows for folders, audio files, binaries etc?

Image
To do this, you'd need a new info label (or conditional) as you indicate.

I'm not sure how best to do it, but would like to hear from other skinners as to how they'd like to do it.

Something like listitem.content(foo) sounds best. If foo is specified then it's a boolean condition, and if not, it returns the content type.

The problem, ofcourse, is defining what content type is returned, and I presume this would have to be localized at the XBMC level (you can localize it yourself if you want different strings by doing multiple controls with conditionals).

Ideas/suggestions most welcome.

Cheers,
Jonathan
i think listitem.content as a info label, the comparestringt(info.content,blalbla) is the most dynamic
I guess the only problem would be whether or not listitem.content would return a localized version or not. If not, localisation could be done by the skinner using conditionals ofcourse, but that could get messy? If so, it'd be messy doing the compares.

Cheers,
Jonathan
I know you're probably thinking in wider terms than me, but the only use I had in mind was returning a boolean value for whether the listitem was a specified file type. I'm not suggesting you're wrong or anything, but I'm interested to know how localisation factors into that.
oh what a tangled web we weave Smile

I'd be happy with ListItem.Type since listitems can be many things these days including static fix list with no files.
And it returns the extention jpg, mpg, avi, gif,
then we could use spiffs compare stuff but that makes for some hella complicated conditions

Or maybe just a broad "Video, Audio, Image, Folder, Static, ParentDir"
so ListItem.Type(foo) which would match with Container.Content(foo)
(which I guess is what djh said at the start)