It use to work fine until a few months ago, possibly when Sonarr was upgraded to v3. I noticed the files are not renaming and when I go into Sonarr and validate the script via Save, I get the following error "Script exited with code: 3".
rename.bat script:
Code: Select all
filebot -rename "%sonarr_series_path%" -r --db TheTVDB --format "{n.upperInitial().space('.')}.S{any{s.pad(2)}{'00'}}E{es*.pad(2).join('-E')}.{t.upperInitial().space('.')}.{'.'+fn.match(/UNRATED|UNCUT|INTEGRAL|IMAX|EXTENDED/).upper()}.{any{fn =~ /AMZN.WEB-DL|WEB-DL|.WEB.|.INTERNAL./ ? /WEBDL/ : source}{'BluRay'}}{'-'+vf}{fn =~ /DolbyVision|DV/ ? /.DolbyVision/ : null}.{aco.replace('Dolby TrueHD with Dolby Atmos', 'TrueHD.Atmos').replace('Dolby TrueHD', 'TrueHD').replace('DTS-HD Master Audio', 'DTS-HD').replace('Dolby Digital Plus with Dolby Atmos', 'DD+.Atmos').replace('Dolby Digital Plus', 'DD+').replace('Dolby Digital', 'DD')}.{channels}{'.'+fn.match(/REMUX/).upper()}"