diff --git a/installer/msi/filebot.platform.launcher.l4j.ini b/installer/msi/filebot.platform.launcher.l4j.ini index 3f03968d..8b61d710 100644 --- a/installer/msi/filebot.platform.launcher.l4j.ini +++ b/installer/msi/filebot.platform.launcher.l4j.ini @@ -2,6 +2,14 @@ -Dapplication.deployment=msi -Dapplication.dir="%APPDATA%\FileBot" +# FileBot system properties +-DthreadPool=8 +-Dunixfs=false + +# proxy settings +# -Dhttp.proxyHost=localhost +# -Dhttp.proxyPort=8888 + # memory settings -Xms64m -Xmx512m diff --git a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy index 0dd6e709..41b3feb1 100644 --- a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy +++ b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy @@ -66,6 +66,7 @@ URL.metaClass.getHtml = { new XmlParser(new org.cyberneko.html.parsers.SAXParser URL.metaClass.fetch = { fetch(delegate) } ByteBuffer.metaClass.getText = { csn = "utf-8" -> Charset.forName(csn).decode(delegate.duplicate()).toString() } ByteBuffer.metaClass.getHtml = { csn = "utf-8" -> new XmlParser(new org.cyberneko.html.parsers.SAXParser()).parseText(delegate.getText(csn)) } +String.metaClass.getHtml = { new XmlParser(new org.cyberneko.html.parsers.SAXParser()).parseText(delegate) } URL.metaClass.get = { delegate.getText() } URL.metaClass.post = { Map parameters -> post(delegate.openConnection(), parameters) } diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy index 7e1c7c37..f130cf5f 100644 --- a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy +++ b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy @@ -39,7 +39,7 @@ String.metaClass.pad = Number.metaClass.pad = { length = 2, padding = "0" -> del /** * Return a substring matching the given pattern or break. */ -String.metaClass.match = { String pattern -> def matcher = delegate =~ pattern; if (matcher.find()) return matcher[0] else throw new Exception("Match failed") } +String.metaClass.match = { String pattern, int matchGroup = 0 -> def matcher = delegate =~ pattern; if (matcher.find()) return matcher.group(matchGroup) else throw new Exception("Match failed") } /**