Possible to use substring in <texture> tag?
#1
I am trying to get storage flags working in a more general way:
Code:
<control type="image">
      <description>Storage Image</description>
      <width>90</width>
      <height>33</height>
      <aspectratio>keep</aspectratio>
      <label>substring(ListItem.FilenameAndPath,9,2)</label>
     <texture>$INFO[substring(ListItem.FilenameAndPath,9,2),flagging/storage/,.png]</texture>
      <visible>substring(ListItem.FilenameAndPath,/media/HD)</visible>
    </control>
The visible part works great. However the texture is not displayed. If i hardcode the texture as flagging/storage/01.png it works.
Reply
#2
Substring is a boolean condition that only returns true or false.
Reply
#3
Hey Walt,
nice to see you here,too...

BTW: Why using substring? Just try ListItem.FilenameAndPath...

mm
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
#4
using ListItem.FilenameAndPath will yield a faulty texture path.
Lets say that FilenameAndPath == "/media/HD01/foo.mkv" then the texture path should be "media/taggings/storage/01.png". If I would set texture to ListItem.FilenameAndPath then it would be:
"media/taggings/storage/media/HD01/foo.mkv.png"

So that is clearly not working.
Any other idea except for copying:
Code:
<control type="image">
      <width>90</width>
      <height>33</height>
      <texture>flagging/storage/02.png</texture>
      <visible>substring(ListItem.FilenameAndPath,/media/HD02)</visible>
</control>
over and over again for each "/media/HD(\d+)"?
Reply

Logout Mark Read Team Forum Stats Members Help
Possible to use substring in <texture> tag?0