right now my code is
Code: Select all
H:/{fn=~/2160p/?'Movies 4K':'Movies'} {vc =~ /HEVC|265/ ? '(x265)' : '(x264)'}/{norm = {it.colon(' - ').tr('*?|', ' !-').asciiQuotes().replaceAll(/\b(?i)[IVX]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:|st|nd|rd|th)\b/, { it.lower() }).replaceAll(/(Collection) of the (.+)/, /$2 $1/).replaceAll(/(Saga) Collection/, /$1/).replaceAll(/^(i:|A|An|The) (.+)/, /$2, $1/)};path = allOf{ norm(collection) } { norm(n) }.join('/');path[0].replaceAll(/\W|\d/, '#') + '/' + path} {norm(n) != norm(primaryTitle) ? ' (' + primaryTitle + ')' : null}{fn =~ /3D|3-D/ ? ' 3D' : null} ({y}) {["$group"]}/ {model.findAll{ it.collection == collection }.sort{ it.d }.findIndexOf{ it.id == id } + 1} {allOf{n.asciiQuotes().removeAll(/[,!]/)}{fn =~ /3D|3-D/ ? '3D' : null}{tags*.upper()}{' [' + fn.matchAll (/Expanded|Theatrical.Cut|4K.REMASTER|Colorized|PROPER|REPACK/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ']'}{".$y"}{'Part'+pi}{".$vf"}{".$source"}{".$vc"}{if (bitdepth >= 10) '10bit'} {if (bitdepth >= 10)'HDR'}{".$ac"}{".$channels"}.join('.').space('.')}CH{'-'+group}
H:\Movies (x265)\A\Avengers Collection, The\1\Avengers, The (2012)\The.Avengers.2012.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265.mkv
H:\Movies (x265)\A\Avengers Collection, The\2\Avengers - Age of Ultron (2015)\Avengers.Age.of.Ultron.2015.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265.mkv
H:\Movies (x265)\A\Avengers Collection, The\3\Avengers - Infinity War (2018)\Avengers.Infinity.War.2018.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265.mkv
I would like the collection to look like this:
H:\Movies (x265)\A\Avengers Collection, The\1 The.Avengers.2012.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265.mkv
H:\Movies (x265)\A\Avengers Collection, The\2 Avengers.Age.of.Ultron.2015.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265.mkv
H:\Movies (x265)\A\Avengers Collection, The\3 Avengers.Infinity.War.2018.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265.mkv
Except when a movie does not have a collection I would like it to have the subfolder like this:
H:\Movies (x265)\A\Animal House (1978)\Animal.House.1978.1080p.AAC.5.1CH.x265.mkv