Help on some quick actions

Hi,

I've been using mp3tag for some time, but never realised just how smart some of it's features were or could be. I've finally started using the quick actions to sort out what I thought was a reasonably well organised mp3 library.

I'm having a few issues with a couple of actions, one posted by one of the users In this post

$regexp(%TITLE%,'\b(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?X{0,3})|L)?((I[VX])|(V?(I{0,3}))|V)?)\b','\U$0',1)

It's great for things like Queen II etc, but there are a lot of tracks that's it misidentifying as being roman numberal & capitalising the title. E.g "I'd Die for You" becomes "I'D Die for You". I don't know how to fix this? Can anyone shed any light?

My second problem is that I have few albums that have one or more cd's & I've updated the discnumber tag for these - I think I can set the _DIRECTORY tag to use the %DISCNUMBER% to move the files into the appropriate subfolder of the album, but I was hoping to only do this when there is more than one disc. I thought I could use the _counter for this, but again I'm having some problems with it - Please Help!

D:\\%artist%\\%album%\$if2($if2(%DISCNUMBER% > %_counter%,%DISCNUMBER%)>1,CD%DISCNUMBER%\)

Perhaps I need to look at other options such as exporting a list, (but I don't really know how to do that or how I'd get the highest discnumber from that).

And the final issue I'm having trouble with is that I got an error message when an album had the same name as the artist, but I'm not sure why, so I got around it by using an if statement to make sure they were different before renaming the folder.

$if($neql(%ALBUMARTIST%,%ALBUM%),$if(%ALBUM%,$if(%YEAR%,$regexp(%_folderpath%,%ARTIST%.*$,%ALBUMARTIST%\\\\(%YEAR%) %ALBUM%),$regexp(%_folderpath%,%ARTIST%.*$,%ALBUMARTIST%\\%ALBUM%)),%DIRECTORY%),%DIRECTORY%)

BTW if it helps the directory structure is something like:
K:\Q\Queen\Greatest Hits II
& I'm trying to get it looking something like:
K:\Q\Queen(1994) Greatest Hits II\CD 1
K:\Q\Queen(1994) Greatest Hits II\CD 2\

Without any modification of the regular expression itself, this special case can be repaired by a following action as a workaround ...

Examples ... $replace(I''D Die for You,I''D ,I''d ) ... or ... $replace('I''''D Die for You','I''''D ','I''''d ') Formatstring ... $replace(%TITLE%,I''D ,I''d ) ...or ... $replace(%TITLE%,'I''''D ','I''''d ')

DD.20160401.1040.CEST

Perhaps this works for you ...

$regexp(%TITLE%,'(?:^|\s+)(?:[MDCLXVI]+)(?=\s+|$)','\U$0',1)

DD.20160401.1732.CEST

There is a Mp3tag export script file, which outputs the result of 6 different regular expressions regarding "Upcasing Roman Numerals" ...
Export.TXT.20160401.Test.RomanNum.Upcase.4.mte (11.1 KB)
DD.20160401.1906.CEST

Export.TXT.20160401.Test.RomanNum.Upcase.4.mte (11.1 KB)

Thanks I'll try that. It was also occurring for others too, such as I'M

That worked. I did find one song with a french title "est ici" which got turned in to "est ICI", but I can live with that.

Well, the string "ICI" seems not to be a valid roman number; it could be read as 99+1, which gives 100, which is the roman number "C".
If you want to suppress such oddities, then you need a regular expression, which does not only convert lowercase letters into upper case letters, but checks for a meaningful sequence of roman number letters too, therefore try some regex from the elaborated ones.

DD.20160402.0733.CEST

Thanks - I appreciate the reply & you are correct. I fixed that issue - it wasn't the Roman Numeral reg exp, it was something else.

I also managed to create the reg exp to create sub folders in the album folder based on the discnumber - I wasn't able to get it to check if there's more than one disc in an album collection & only create the folder if the album has more than one cd, but I can live with that.

K':\'$if($and($neq(%ALBUMARTIST%,'Various Artists'),%ALBUM%),$left(%ALBUMARTIST%,1),$left(%ARTIST%,1))'\'$if($and($neq(%ALBUMARTIST%,'Various Artists'),%ALBUM%),%ALBUMARTIST%,%ARTIST%)'\'$if($and(%YEAR%,%ALBUM%),(%YEAR%) %ALBUM%,$if2(%ALBUM%,))'\'$if(%DISCNUMBER%,CD %DISCNUMBER%'\',)$replace($validate(%ARTIST% - %TITLE%, ),  ,)