Remove redundent use of (Year) in title
Posted: 06 Dec 2013, 23:52
Heya,
Got another curly one for you...
With my ever increasingly complicated renaming format (see below), I list the year and rating at the end of the shows main folder:
e.g. Boardwalk Empire (2010 TV-MA)\Season 01\Boardwalk Empire S01E01 Boardwalk Empire [360p XviD MP3 2ch].avi
Unfortunately, as Hollywood runs out of ideas of things to make shows about (or what to call them), we end up with an increasing number of shows that need to have their year referenced in the name to identify them - such as Once Upon A Time (2011). This leads me to have a bit of a problem..
e.g. Once Upon A Time (2011) (2011 TV-PG)\Season 03\Once Upon A Time (2011) S03E09 Save Henry [576p x264 AAC 2ch].mp4
So, I'm wondering - how do I remove the reference of a year if it's the same as the year I'm already showing (which it always should be). That is, how do I make "Once Upon A Time (2011) (2011 TV-PG)" appear sort as "Once Upon A Time (2011 TV-PG)", and any other shows like it (new or old etc.) without having to write individual exceptions for all of them. :-/
My current format:
Thanks! 
Got another curly one for you...
With my ever increasingly complicated renaming format (see below), I list the year and rating at the end of the shows main folder:
e.g. Boardwalk Empire (2010 TV-MA)\Season 01\Boardwalk Empire S01E01 Boardwalk Empire [360p XviD MP3 2ch].avi
Unfortunately, as Hollywood runs out of ideas of things to make shows about (or what to call them), we end up with an increasing number of shows that need to have their year referenced in the name to identify them - such as Once Upon A Time (2011). This leads me to have a bit of a problem..
e.g. Once Upon A Time (2011) (2011 TV-PG)\Season 03\Once Upon A Time (2011) S03E09 Save Henry [576p x264 AAC 2ch].mp4
So, I'm wondering - how do I remove the reference of a year if it's the same as the year I'm already showing (which it always should be). That is, how do I make "Once Upon A Time (2011) (2011 TV-PG)" appear sort as "Once Upon A Time (2011 TV-PG)", and any other shows like it (new or old etc.) without having to write individual exceptions for all of them. :-/
My current format:
Code: Select all
{norm = {it.upperInitial().lowerTrail().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'} ({y}{" $certification"})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{" [$vf $vc $ac $af]"}
