Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Columns UI: Change item color based on tag value (Read 766 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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! :)

Re: Columns UI: Change item color based on tag value

Reply #1
Start with:
$if($strstr(%AXMASTER%,'!!!'),

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.