Release Group: Subtitles renamed as 'null'

All about user-defined episode / movie / file name format expressions
Post Reply
guimello
Posts: 8
Joined: 08 Feb 2015, 12:33

Release Group: Subtitles renamed as 'null'

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Release Group: Subtitles renamed as 'null'

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply