I'm trying to get two anime series (Mr. Osomatsu and Haibane Renmei) to match correctly with anidb; each individual episode has multiple segments which have different names, and I want to show this in the file name. So,
Original Titles
Osomatsu-san episode 2 is "Let`s Get a Job / The Melancholy of Osomatsu", and 4 is "Let`s Become Independent / This Is Totoko"
Haibane Renmei episode 1 is "Cocoon / Dream of Falling from the Sky / Old Home" and episode 2 is "Town and Wall / Toga / Haibane Renmei"
Filebot outputs
02 - Let's Get A Job The Melancholy Of Osomatsu and 04 - Let's Become Independent This Is Totoko
01 - Cocoon Dream Of Falling From The Sky Old Home and 02 - Town And Wall Toga Haibane Renmei
What I want
02 - Let's Get A Job &(or -) The Melancholy Of Osomatsu and 04 - Let's Become Independent - This Is Totoko
01 - Cocoon - Dream Of Falling From The Sky - Old Home and 02 - Town And Wall - Toga - Haibane Renmei
Here is my original expression:
Code: Select all
I:/TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[´`‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[\]]/, " - ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() })}; norm(n)} ({y})/{episode.special ? 'Specials' : 'Season '+s.pad(1)}/{e.pad(2)} - {norm(t).upperInitial().replaceAll(/[?.:]/).replacePart(', Part $1')} [{resolution}]