Here's some code and data that I hope will help others.
Groovy: Select all
def root="P:"
config="P:/FileBot/"
def maps = include config+"config.groovy"
def map = maps['DEFAULTS'] + maps['TV'], folders=map['folders'], dd=map['dd'], talkshows=map['talkshows'], anime=(anime ? (map['anime'] ? "ANIME" : null) :null)
def groups = allOf{"TV"}{map['groups'].join('|')}{anime}.join('|'), drives=folders.keySet().join('|')
def franchises = map['franchises'], franchise = any{franchises.find{k,v-> fn=~v }.key}{franchises.find{k,v-> imdbid=~"^${v}\$" }.key}{franchises.find{k,v-> tvdbid=~"^${v}\$" }.key}{}
def col = /(tt|tmdb|tvdb)[0-9]+/
Groovy: Select all
[
"DEFAULTS":[
"dd":"06",
"collections":"collections.txt",
"overrides":"overrides.txt",
"folders":[
"01":"_01",
"02":"_02",
"03":"_03",
"04":"_04",
"05":"_05",
"06":"_06",
"E1":"_E1",
"E2":"_E2",
"E3":"_E3",
],
],
"TV":[
"talkshows":true,
"anime":false,
"franchises":[
"StarTrek": "^Star ?Trek|tt0112178|74550",
"StarWars": "^(Star ?Wars|(The ?)?Mandelorian|Obi-?Wan ?Kenobi)",
],
"groups":[
"DC(shows)?",
"Marvel(TV)?",
"Star ?Trek",
],
],
"MOVIES":[
"collectionsFolder":"_",
]
]
The "franchises" here is the most recent thing I worked on. Idea is to let it override the default folder name of "TV" later on using the
any{} function.
As an example...
Groovy: Select all
TVfolder=any{franchise}{anime}{"TV"}
So if someone wants to group a bunch of related shows into the same main folder, they just name to set the name of the folder as the key (left side), then enter either names or IMDB ID's or TVDB ID's (or a mix) separated by |'s. If using names, regex format.
The key can have spaces, of course, even though I don't include them above. The 'talkshows' value is since I also separate talk shows from regular shows. I prefer to not separate shows based on anime, but that's made into an easy to toggle option. Helpful when wanting to toggle something both via GUI and command line uses without making changes in multiple places.