Help with custom renaming ifpremieredate & ifseason

I’m trying to use the following string to rename my TV shows but it’s falling back to default.
%showname%%ifpremieredate%< (%premiereyear%)>\Season %ifseason%<%season%##,00>\%showname% - S%ifseason%<%season%##,00>E%episode%## - %episodename%

Here is the error:

INFORMATION> 2020-09-10T15:59:43 MCEBuddy.Engine.ConversionJob --> Running custom commands
--> Custom Renaming Command -> %showname%%ifpremieredate%< (%premiereyear%)>\Season %ifseason%<%season%##,00>\%showname% - S%ifseason%<%season%##,00>E%episode%## - %episodename%
WARNING> --> Error in file naming format detected, fallback to default naming convention.
Error : System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at MCEBuddy.MetaData.CustomRename.CustomRenameFilename(String customRenamePattern, String& newFileName, String& destinationPath, String sourceVideo, String relativeSourcePath, VideoTags metaData, Log jobLog)
   at MCEBuddy.MetaData.CustomRename.CustomRenameFilename(String customRenamePattern, String& newFileName, String& destinationPath, String sourceVideo, String relativeSourcePath, VideoTags metaData, Log jobLog)
   at MCEBuddy.MetaData.CustomRename.GetRenameByMetadata(ConversionJobOptions conversionOptions, VideoMetaData metaData, String originalFileName, String renamedFileExt, String& newFileName, String& subDestinationPath, Log jobLog)
WARNING> --> No Season and Episode information available, using episode name/record date
--> Custom Renaming Command -> %showname%%ifpremieredate%< (%premiereyear%)>\Season %ifseason%<%season%##,00>\%showname% - S%ifseason%<%season%##,00>E%episode%## - %episodename%
WARNING> --> Error in file naming format detected, fallback to default naming convention.
Error : System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at MCEBuddy.MetaData.CustomRename.CustomRenameFilename(String customRenamePattern, String& newFileName, String& destinationPath, String sourceVideo, String relativeSourcePath, VideoTags metaData, Log jobLog)
   at MCEBuddy.MetaData.CustomRename.CustomRenameFilename(String customRenamePattern, String& newFileName, String& destinationPath, String sourceVideo, String relativeSourcePath, VideoTags metaData, Log jobLog)
   at MCEBuddy.MetaData.CustomRename.GetRenameByMetadata(ConversionJobOptions conversionOptions, VideoMetaData metaData, String originalFileName, String renamedFileExt, String& newFileName, String& subDestinationPath, Log jobLog)
WARNING> --> No Season and Episode information available, using episode name/record date

Here are the values detected:
SeriesPremiereDate: 1985-05-05T00:00:00
Season: 0
Episode: 6

I see what I did. I was missing a comma.
%showname%%ifpremieredate%< (%premiereyear%)**,**>\Season %ifseason%<%season%##,00>\%showname% - S%ifseason%<%season%##,00>E%episode%## - %episodename%

1 Like

You can actually test your pattern within the Conversion task settings page itself. When you type in your renaming pattern, it’ll tell you if something isnt’ right or it’ll show the final template if it’s good.

image

Yep, I see that now. Good looking out.