AMC Script: custom name for TV-episodes
Posted: 19 Nov 2014, 15:13
I'm trying to configure this script so that it renames my tv-episodes to a standard format.
This is the format I'm using untill now within Filebot itself, and there it just works.
Now i'm trying to automate this.
This is the commandline I'm using:
I've translated my import setting with the Escape Tool.
This is the only error message I'm getting:
This is the format I'm using untill now within Filebot itself, and there it just works.
Code: Select all
{n.upperInitial().space('.').replaceAll(/[,()]+/).replaceAll(/\.-\./,'.')}.{s00e00}{"."+fn.match(/(?i:unrated)/).toLowerCase().upperInitial()}{"."+fn.match(/(?i:uncut)/).toLowerCase().upperInitial()}{"."+fn.match(/(?i:extended)/).toLowerCase ().upperInitial()}{"."+fn.match(/(?i:internal)/).toUpperCase()}{(dim[1]>480 && dim[0]==1280) ? '.720p' : (dim[1]>720 && dim[0]==1920) ? '.1080p' : null}{".$source"}{"."+vc.replaceAll(/AVC/, "H264")}{'-'+fn.replaceAll(/$n/,n.replaceAll(/ [-]/,'.')).match(/(?:(?<=[-])(?!(cd|CD)[0-9]+)\w+$)|(?:^(?!(cd|CD)[0-9]+)[A-Za-z0-9]+(?=[-]))|(?:(?<=^[\[])[^\]]+(?=[\]]))|(?:(?<=[\[])[^\]]+(?=[\]]$))/)}{"."+fn.match(/(?i:proper)/).toUpperCase()}{"."+fn.match(/(?i:repack)/).toUpperCase()}{"."+group}{"."+lang}
This is the commandline I'm using:
Code: Select all
filebot -script fn:amc --output "C:\Users\admin\Downloads\Sickbeard\Import\tv-series" --log-file amc.log --action test --conflict override -non-strict --def "seriesFormat="{n.upperInitial().space('.').replaceAll(/[,()]+/).replaceAll(/\\.-\\./,'.')}.{s00e00}{\".\"+fn.match(/(?i:unrated)/).toLowerCase().upperInitial()}{\".\"+fn.match(/(?i:uncut)/).toLowerCase().upperInitial()}{\".\"+fn.match(/(?i:extended)/).toLowerCase ().upperInitial()}{\".\"+fn.match(/(?i:internal)/).toUpperCase()}{(dim[1]>480 && dim[0]==1280) ? '.720p' : (dim[1]>720 && dim[0]==1920) ? '.1080p' : null}{\".$source\"}{\".\"+vc.replaceAll(/AVC/,\"H264\")}{'-'+fn.replaceAll(/$n/,n.replaceAll(/ [-]/,'.')).match(/(?:(?<=[-])(?!(cd|CD)[0-9]+)\\w+$)|(?:\^(?!(cd|CD)[0-9]+)[A-Za-z0-9]+(?=[-]))|(?:(?<=\^[\\[])[\^\\]]+(?=[\\]]))|(?:(?<=[\\[])[\^\\]]+(?=[\\]]$))/)}{\".\"+fn.match(/(?i:proper)/).toUpperCase()}{\".\"+fn.match(/(?i:repack)/).toUpperCase()}{\".\"+group}{\".\"+lang}\""
This is the only error message I'm getting:
Code: Select all
[0-9]+)[A-Za-z0-9]+(? was unexpected at this time.