Help with Media CD (multi and single)

Tags: #<Tag:0x00007f756e8af120> #<Tag:0x00007f756e8af058>

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:
If I have the single disc I want:
What I get now is:

My code right now is this:

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.


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.


@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?
should have been:

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:


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.


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