Skip to main content

Topic: Columns UI: Change item color based on tag value (Read 188 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Axonn
  • [*][*]
Columns UI: Change item color based on tag value
Hey. I'd like to change the color of a playlist item if the tag begins with "!!!"

I tried enabling "Use custom style script" in Playlist View -> Columns.

My script is probably wrong, because it doesn't work:

$ifequal($strstr(%AXMASTER%,"!!!"),0,$rgb(0,0,0))
I tried with $set_style too:
$ifequal($strstr(%AXMASTER%,"!!!"),0,$set_style(text,FF0000,0))

I used "ifequal" and assumed that if the string starts with "!!!", $strstr will return index position 0.

I would actually prefer to use $if and to compare that the return value is >= 0 (I assume that if the string is not found, $strstr will return -1, similar to other string search functions). Am I wrong?

In case you're wondering AXMASTER is a custom ID3 tag I added. It works searching by it and writing it via Foobar. In other words, other functionalities regarding this tag are working so I don't think my issue is caused by using a custom tag.

Thank you in advance! :)
  • Last Edit: 13 November, 2017, 11:16:31 AM by Axonn

  • michtar
  • [*][*][*]
Re: Columns UI: Change item color based on tag value
Reply #1
Start with:
$if($strstr(%AXMASTER%,'!!!'),

  • Axonn
  • [*][*]
Re: Columns UI: Change item color based on tag value
Reply #2
And... it works! Thank you sire! :). A bow to you. What sort of bow? A bow of the head and an Amazon's Enchanted Bow Of Happiness, +15 to happiness, +2 to Light Radius and +5 to Intelligence :D.