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 for text? (Read 2731 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$ifequal for text?

Hey everyone,

Currently trying to change my Foobar layout, and I need something along the lines of:

Code: [Select]
$ifequal(%RANDOMTAG%,Part A,%RANDOMTAG%,)


However, it seems $ifequal only works for numbers, and not words. Is there any way I can code something which does the same thing as $ifequal but for text? I've spent ages looking at the Title Formatting page, but I've had little luck. 

Thanks!

$ifequal for text?

Reply #1
Hmm... Extract the number part of the string and then do the comparison?

$ifequal for text?

Reply #2
This particular tag I want to use won't always have numbers in it, though.


$ifequal for text?

Reply #4
$if($stricmp(%randomtag%,Part A),%randomtag%,...)

$ifequal for text?

Reply #5
Thanks a lot guys, not sure how I missed that one!

Much appreciated.

$ifequal for text?

Reply #6
New problem, may as well ask in this thread given it's still active...

I'd like %discside% (new tag I've made for specific purpose) to be, say, Side A, Side B, Disc 1, Disc 2, Part I, Part II etc, but for it to only display if the track number is 1.

So essentially, in the UI, it'd look like:

Code: [Select]
1 Side A
2
3
4
5
1 Part II
2
3
4
5
6


To display (when appropriate) the Side A/Side B bit, I've written this, but it doesn't seem to work...

Code: [Select]
$if($and(%DISCSIDE%,$ifequal(%tracknumber%,1)),%DISCSIDE%,)


Does anyone know why, or how I can fix it? I've tried to make it so that an $if function only works when there is a tag present for DISCSIDE and TRACKNUMBER=1, but nothing's happening...

$ifequal for text?

Reply #7
Bump?

$ifequal for text?

Reply #8
We don't bump things around here, and especially not on the same day.
Your question is no more important than anyone else's.
elevatorladylevitateme