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: $ifequal(n1,n2,then,else) function not working as expected. (Read 1756 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$ifequal(n1,n2,then,else) function not working as expected.

I'm trying to use $ifequal(n1,n2,then,else) to display a string when %artist% is different than %album artist%. Problem is that $ifequal doesn't seem to work properly. It always returns the "then" part. I tested it in "Playback state display formatting" where you can get instant feedback on function output.

Edit: Mhm. It seems like it only supports integer numbers. disregard this.

$ifequal(n1,n2,then,else) function not working as expected.

Reply #1
You could use the string compare function:

$if($strcmp(%artist%,%album artist%),then,else)

$ifequal(n1,n2,then,else) function not working as expected.

Reply #2
Thanks, this is exactly what I was looking for. My search-fu is weak, and "compare" did not highlight any occurrences in the wiki or Titleformatting reference file.

$ifequal(n1,n2,then,else) function not working as expected.

Reply #3
You realize that %album artist% already checks the artist field, right?

Metadata remapping
elevatorladylevitateme

$ifequal(n1,n2,then,else) function not working as expected.

Reply #4
Reply to similar question
This is HA. Not the Jerry Springer Show.