Page 1 of 1

Release Group: Subtitles renamed as 'null'

Posted: 27 Mar 2017, 22:04
by guimello
Hi!

I'm current using the following seriesFormat to rename my TV Shows:

Code: Select all

seriesFormat=/home/media/tv/{n}/{'Season '+s.pad(2)}/{n} - {S00E00} - {t} [{fn.matchAll(/repack|proper|extended/).join('.').upper()+'.'}{try{source}catch(e){'WEB'}}.{vf}{'.'+vc.replaceAll(/AVC/, 'x264')}{'-'+any{$group}{fn.match(/(?:(?<=[-])\w+$)|(?:^\w+(?=[-]))/)}}]
The issue I'm having is with the release group. If it doesn't match {group}, it will use reg-ex which almost always works fine. However, when download subtitles, Filebot will replace the regex release group with "null".

Any ideas on how I could fix this?

Example:

File renamed:

Code: Select all

TV Show Name - S01E01 - We Just Decided To [BRRip.720p.x264-PSYPHER].mp4
Subtitle renamed:

Code: Select all

TC Show Name - S01E01 - We Just Decided To [BRRip.720p.x264-null].srt

Re: Release Group: Subtitles renamed as 'null'

Posted: 28 Mar 2017, 06:13
by rednoah
You'll want to return null as a result of the expression:

Code: Select all

any{'-'+group}{'-'+fn.match(/.../)}

If you do '-' + null then you'll just get a String '-null' which is not what you'll want to return.