Help: Naming script - how to handle different two similar versions

Hi everyone,

I’ve finally decided to use the file naming script after a couple of failed attempts.
The script I’m using right now is:

$if2(%albumartist%,%artist%)/$if($ne(%albumartist%,),$if(%date%,%date%,0000)- %album% [%media%\, %releasetype%] [%catalognumber%] [%releasecountry%] /,)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2),) - $if(%_multiartist%,%artist% - ,)%title%

It does the trick so far and I could solve it for different country releases by adding it to the script, but I’m still struggling with releases that are too similar.

For example:

(the second one is a simplified version with some additional information on the front cover, data-wise it’s the same)

At the moment I ended up with this:
Cue, log & m3u files were overwritten, I think.

How can I set it up the way it will keep both releases separated?
I’m happy if it could grab the “Disambiguation” field too I think

Some additional challenges:

  • I want to capitalize the media type (album, single etc.) in the folder name
  • If the media is “Enhanced CD” for example, I want to keep CD only in the name
  • Digital Media should change to WEB
  • If the cat. no is [none], I want to get rid of the ‘[’ ‘]’

Thanks.

Trouble is when you have a pair of identical releases a dumb computer will not know. Unless there is an overwrite warning.

The only suggestion I could make there is to add part of the MBID to the file name as nothing else is unique between those two. Or maybe get the Release Disambig into the folder name? That may be easier to achieve.

How often are you going to have identical clashes like this in your collection? Sometimes it is just easier handling a few cases manually to get round issues like this.

2 Likes

It happens from time to time, I have like maybe 5 in my collection atm.

I work with computers all day and distrust them. When I see five exceptions, I just do those manually instead of trying to force a rule to handle them. The perfect “cover all rule” will lead to compromises and unforseen hiccups.

2 Likes

You should be able to get the disambiguation comment (if there is one) via the %comment% tag. Perhaps add something like:

$if(%comment%, \(%comment%\))

Note that you may want to use something like $truncate(%comment%,30) or $firstwords(%comment%,30) to limit the length in case the disambiguation comment is extremely long.

If I understand you correctly, I think adding the following to the beginning of your file naming script should do what you want. This uses a simple approach to media type substitution. It’s also possible to do the replacement based on specific current types, but that is a bit more complex. Let me know if you want to go that route.

$set(media,$upper(%media%))
$if($find(%media%,DIGITAL),$set(media,WEB))
$if($find(%media%,CD),$set(media,CD))
$if($find(%media%,DVD),$set(media,DVD))
$if($find(%media%,VINYL),$set(media,VINYL))

Note that this will make the replacement based on the first match found in the %media% tag.

You should be able to do that by replacing [%catalognumber%] (including the leading space before it) with $if(%catalognumber%, [%catalognumber%]) (note the space between the comma and the opening square bracket).

EDIT: Rather than using the disambiguation comment, you could use the Release ID which will always be unique between releases. Something like:

[ID %musicbrainz_albumid%]

This will also avoid the issue of a potentially really long disambiguation comment being added to the path name, although it won’t provide a description of the difference.

4 Likes

rdswift thank you a lot for all the suggestions. I will try it out and let you know if I got there.

2 Likes

This worked like a charm thank you!

This helped me to get where I wanted to go! NICE

Unfortunately, this is too long for my need. Thank you anyway for your suggestions

2 Likes

@rdswift One last thing. I have an album title that goes like this:

“The Last Don: The Gold Series” when I run the script it creates the folder name “The Last Don/ The Gold Series”.

How can I get rid of the / by replacing it with a space or something different like -

I couldn’t find a “replace characters option” or similar.

Thanks

If I understand correctly, you should be able to do this in your file naming script by replacing %album% with $replace(%album%,:,-).

1 Like