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}