ListItem.Content...?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
djh_ Offline
Aeon Project Founder
Posts: 1,890
Joined: Jun 2007
Post: #1
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: aeon2_icons.jpg]
(This post was last modified: 2008-12-17 18:37 by djh_.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,181
Joined: Nov 2003
Reputation: 82
Post: #3
i think listitem.content as a info label, the comparestringt(info.content,blalbla) is the most dynamic

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #4
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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
djh_ Offline
Aeon Project Founder
Posts: 1,890
Joined: Jun 2007
Post: #5
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.
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,264
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #6
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)

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote