using new {ci}binding

All about user-defined episode / movie / file name format expressions
Post Reply
cyberdoggy
Posts: 34
Joined: 03 Sep 2016, 21:27

using new {ci}binding

Post by cyberdoggy »

Yes I am at it again as usual

I like the new idea of Numbering collections, here is my dilemma...
I want to use my naming scheme with the new {ci} binding. I managed to incorporate it into my scheme. but as per examples, I want to do away with the individual folder names in my collections only so the movies will all be in 1 folder in number order while non-collections will still retain movie folder names.

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"}{if (bitdepth >= 10) '10bit'} {if (bitdepth >= 10)'HDR'}{".$source"}{".$ac"}{".$channels"}.join('.').space('.')}CH{".$vc"}{'-'+group}
This is my scheme and here is the example of what I am looking to do...

What I have now:

Code: Select all

H:\Movies (x265)\A\Avengers Collection, The\Avengers, The (2012) [Tigole]\1 The.Avengers.2012.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265-Tigole
H:\Movies (x265)\A\Avengers Collection, The\Avengers - Age of Ultron (2015) [Tigole]\2 Avengers.Age.of.Ultron.2015.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265-Tigole
the new way I would like it:

Code: Select all

H:\Movies (x265)\A\Avengers Collection, The\1 The.Avengers.2012.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265-Tigole
H:\Movies (x265)\A\Avengers Collection, The\2 Avengers.Age.of.Ultron.2015.1080p.10bit.HDR.BluRay.AAC.7.1CH.x265-Tigole
But movies without collections I would like to keep the file in it's individual folder like this...

Code: Select all

H:\Movies (x265)\A\Airheads (1994) [RMTeam]\Airheads.1994.1080p.BluRay.AAC.5.1CH.x265-RMTeam
IF anybody could help me make that one change it would be very helpful thanks!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: ? using new {ci}binding

Post by rednoah »

I'll focus on the key component only here:

Code: Select all

{any{collection + '/' + ci + '. '}{ny + '/'}}
This part will yield "Avatar Collection/1. " or "Avatar (2009)/" depending on whether or not {collection} and {ci} are defined.
:idea: Please read the FAQ and How to Request Help.
Post Reply