Help with Media CD (multi and single)

OK see if I can get help on this one.
I want to use CD if media is a CD and I want to use 2CD 4CD etc if it is a multi disc CD but I don’t want both in the same dir.
If I have multi-disc I want:
喜多郎-The_Best_of_Ten_Years_(1976_-1986)-COMPILATION-2CD-1997
If I have the single disc I want:
Kitaro_featuring_Yu-Xiao_Guang-Kitaro’s_World_of_Music-(71011-2)-CD-1996
What I get now is:
喜多郎-The_Best_of_Ten_Years
(1976_-_1986)-COMPILATION-2CD-CD-1997

My code right now is this:
$if($gt(%totaldiscs%,1),-%totaldiscs%CD)
$if($in(%media%,CD),-CD,)

How do I combine it so if media is single it says CD and if it’s multi-disc it says 2CD or whatever the disc count is?
But I also need it to say the disc count if it’s More than 1 Digital media too, I know that makes it really confusing and hard!

This is just off the top of my head, so I haven’t tested it.

$if($in(%media%,CD),$if($gt(%totaldiscs%,1),-%totaldiscs%CD,-CD),)

I think that will work. First it checks if the media is CD, then checks if there’s multiple CDs and just outputs -CD if it’s only one. That should fix the -2CD-CD problem and also the problem you would have had if you added a multi-vinyl or digital album. You would have gotten 2CD for two-disk vinyl album.

3 Likes

@Billy_Yank kinda works but when it’s an actual multiple CD Now I don’t get anything?
I now get this: Hollies,_The-Single_Collection-COMPILATION-FLAC
I should get this: Hollies,_The-Single_Collection-COMPILATION-2CD-FLAC

If you’re talking about this release:

It’s because that release doesn’t have its media set to CD, they’re showing as unknown, so the $if($in(%media%,CD),… is failing.

1 Like

Didn’t work for this either?
Beatles,The-Abbey_Road(Super_Deluxe_Edition)-WEB-FLAC-2019
should have been:
Beatles,The-Abbey_Road(Super_Deluxe_Edition)-WEB-3CD-FLAC-2019

Before when I used $if($gt(%totaldiscs%,1),-%totaldiscs%CD) It worked everytime regardless what the website said?
And BTW Thanks for helping me out!

If you don’t care what the database has for mediatype, then just remove the first if statement:

$if($gt(%totaldiscs%,1),-%totaldiscs%CD,-CD)

This will output -cd for multi-disc releases and -CD for single disk releases, but it will do this no matter what the release media type is in MB. If it’s digital media or vinyl, it will still say CD.

Note that the way you had it at first would output -2CD for any release with 2 media no matter what the release type, but any single media release would not output -CD if the media type was “unknown” or anything except CD.

2 Likes

Understood, Thanks so much going to play with it a bit!