Format Expressions User defined episode / movie naming scheme

About

You can easily define your own episode and movie naming schemes. It uses Groovy expressions, which means that you can do pretty much anything, especially if you know a little bit about programming. You even get media info bindings. You can find predefined format expressions for all kinds of scenarios in the forums. Ready for you to just copy & paste.

Examples

{n} - {s00e00} - {t}Dark Angel - S03E01 - Labyrinth

V:/TV Shows/{n}/Season {s}/{sxe} - {t}V:\TV Shows\Dark Angel\Season 3\3x01 - Labyrinth

{n.space('.').lower()}.{s}{e.pad(2)}dark.angel.301

{n} ({y}){" CD$pi"}The Man from Earth (2007) CD1

{n} [{y}] {vf} {af}The Man from Earth [2007] 720p 6ch

Advanced Examples

{n.upperInitial().space('.')}.{y}.{source}.{vc}-{group}The.Man.From.Earth.2007.DVDRip.XviD-ALLiANCE

{n} ({y}) by {director} [{genres[0]}, {certification}, {rating}]The Terminator (1984) by James Cameron [Action, PG-13, 8.5]

{n.space('_')}_-_{e.pad(2)}_[{resolution}_{vc}_{ac}][{crc32}]Juuni_Kokuki_-_01_[1280x720_XviD_MP3][3E16AF40]

{n.space('.')}.{'s'+s.pad(2)}e{e.pad(2)}.{t.space('.')}.{vf}.{vc}.{ac}Firefly.s01e01.Serenity.720p.x264.ac3

{n} [{airdate.format('yyyy.MM.dd')}] {t}The Daily Show [2010.01.05] George Lucas

E:/Complete/{n} ({y}){'/Season '+s}/{s+'x'}{e.pad(2)} - {t}Rename and move files. The directory structure is completely up to you.

{n.replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail().replacePart(', Part $1')}
My personal favorite. Pretty much 1x01, normalizing accents, and lots of other cleanup operations.

Binding Reference source

Name Description Example
n series/movie name Dark Angel
y series/movie year 2009
s season number 3
e episode number 1
t episode title Labyrinth
airdate episode airdate 2009-06-01
absolute absolute episode number 42
special special number 1
sxe season / episode numbers 1x01
s00e00 season / episode numbers S01E01
imdbid imdb id tt0756683
vc video codec x264
ac audio codec ac3
cf container format mkv
vf standard video format 720p
hpi exact video format 384p
af audio channels 6ch
resolution video size 1280x720
ws widescreen flag ws
sdhd SD/HD video SD or HD
source source medium BluRay
group release group ALLiANCE
crc32 crc32 checksum 3E16AF40
fn file name Serenity
ext file extension mkv
episode episode object <default episode name>
movie movie object <default movie name>
pi movie part index 1
pn number of movie parts 2
lang detect subtitle language eng
collection movie set Avatar Collection
director movie director James Cameron
actors list of actors [Sam Worthington, Zoe Saldana, ...]
genres list of genres [Science Fiction, Action, ...]
certification content rating PG-13
rating movie rating 8.5
info TheMovieDB / TheTVDB info <any movie / series info>
imdb OMDb info <any movie info>
file file object <file path>
dim video dimensions <width and height>
media general media info object <any general media parameter>
video video object [stream 0] <any video parameter>
audio audio object [stream 0] <any audio parameter>
text subtitle object [stream 0] <any subtitle parameter>

Function Reference source

pad(length, padding = "0")Pad strings or numbers with given characters ('0' by default).

match(pattern)Get a substring matching the given pattern or break.

matchAll(pattern)Get a list of substrings matching the given pattern or break.

space(replacement)Replace all spaces (e.g. "Doctor Who" -> "Doctor_Who").

upperInitial()Upper-case all initials (e.g. "The Day a new Demon was born" -> "The Day A New Demon Was Born").

lowerTrail()Lower-case all letters that are not initials (e.g. "Gundam SEED" -> "Gundam Seed").

acronym()Get acronym, i.e. first letter of each word. (e.g. "Deep Space 9" -> "DS9").

before(pattern)Get the substring before the given pattern or the original value.

after(pattern)Get the substring after the given pattern or the original value.

replaceAll(pattern, replacement = "")Replace or remove all occurrences of the pattern.

replaceTrailingBrackets(replacement = "")Replace trailing parenthesis including any leading whitespace (e.g. "The IT Crowd (UK)" -> "The IT Crowd").

replacePart(replacement = "")Replace part identifier (e.g. "Today Is the Day (1)" -> "Today Is the Day, Part 1").

ascii()Convert Unicode to ASCII. (e.g. "Österreich" -> "Osterreich" or "カタカナ" -> "katakana").

transliterate(identifier)Apply any ICU script transliteration. e.g. "中国".transliterate("han-latin") -> "zhōng guó".

Need some help getting started? Check the forums.