From f1c2b9fe916b3766f15458c66650245cabb274fa Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 16 Feb 2012 01:27:39 +0000 Subject: [PATCH] * more aggressive white space normalization (include :?._ as well now) --- .../net/sourceforge/filebot/format/ExpressionFormat.lib.groovy | 2 +- .../net/sourceforge/filebot/ui/rename/FormatDialog.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy index 03581890..4e3cc3fd 100644 --- a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy +++ b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy @@ -50,7 +50,7 @@ String.metaClass.replaceAll = { String pattern -> replaceAll(pattern, "") } * * e.g. "Doctor Who" -> "Doctor_Who" */ -String.metaClass.space = { replacement -> replaceAll(/\s+/, replacement) } +String.metaClass.space = { replacement -> replaceAll(/[:?._\s]+/, replacement) } /** diff --git a/source/net/sourceforge/filebot/ui/rename/FormatDialog.properties b/source/net/sourceforge/filebot/ui/rename/FormatDialog.properties index 5051d6ee..db13fdfb 100644 --- a/source/net/sourceforge/filebot/ui/rename/FormatDialog.properties +++ b/source/net/sourceforge/filebot/ui/rename/FormatDialog.properties @@ -14,7 +14,7 @@ episode.example[2]: {n} [{airdate}] {t} episode.example[3]: {n.space('.').lower()}.{s}{e.pad(2)} # simple name/year -movie.example[0]: {n} ({y}){" CD$pi"}{".$lang"} +movie.example[0]: {n} ({y}){" CD$pi"} # boxee name movie.example[1]: {n.space('.')}.({y}){".part$pi"} # media info name