From 7279c52b2b3a4816894a2efcd92b9208a09e6dc9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 30 Mar 2016 16:43:45 +0000 Subject: [PATCH] Update movie format examples with some basics for the noobs --- source/net/filebot/format/ExpressionFormatMethods.java | 9 +++++++++ source/net/filebot/ui/rename/FormatDialog.properties | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/format/ExpressionFormatMethods.java b/source/net/filebot/format/ExpressionFormatMethods.java index c724bf50..ba0ae0de 100644 --- a/source/net/filebot/format/ExpressionFormatMethods.java +++ b/source/net/filebot/format/ExpressionFormatMethods.java @@ -120,6 +120,15 @@ public class ExpressionFormatMethods { return self.replaceAll("[:?._]", " ").trim().replaceAll("\\s+", replacement); } + /** + * Replace colon to make the name more Windows friendly. + * + * e.g. "Sissi: The Young Empress" -> "Sissi - The Young Empress" + */ + public static String colon(String self, String replacement) { + return self.replaceAll("\\s*[:]\\s*", replacement); + } + /** * Upper-case all initials. * diff --git a/source/net/filebot/ui/rename/FormatDialog.properties b/source/net/filebot/ui/rename/FormatDialog.properties index 9901ab8b..2c44cd9b 100644 --- a/source/net/filebot/ui/rename/FormatDialog.properties +++ b/source/net/filebot/ui/rename/FormatDialog.properties @@ -23,7 +23,7 @@ episode.example[4]: {n}/{'Season '+s}/{n} - {s00e00} - {t} episode.example[5]: {home}/Media/{plex} # simple name/year -movie.example[0]: {n} ({y}){' CD'+pi}{subt} +movie.example[0]: {n.colon(' - ')} ({y}){subt} # name/year and media info movie.example[1]: {n} ({y}, {director}) {vf} {af} # name/year and ratings @@ -31,7 +31,7 @@ movie.example[2]: {n} {[y, certification, rating]} # normalized scene name movie.example[3]: {n.space('.')}.{y}{'.'+source}.{vc} # organize folder structure -movie.example[4]: {n} ({y})/{n} ({y}){' CD'+pi} +movie.example[4]: {ny}/{ny}{' CD'+pi}{subt} # plex standard movie.example[5]: {home}/Media/{plex}