diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index 0ceae95c..528a14ea 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -942,7 +942,10 @@ public class CmdlineOperations implements CmdlineInterface { for (File file : archiveFiles) { Archive archive = new Archive(file); try { - File outputFolder = (output != null) ? new File(output).getAbsoluteFile() : new File(file.getParentFile(), getNameWithoutExtension(file.getName())); + File outputFolder = new File(output != null ? output : getName(file)); + if (!outputFolder.isAbsolute()) { + outputFolder = new File(file.getParentFile(), outputFolder.getPath()); + } CLILogger.info(String.format("Extract archive [%s] to [%s]", file.getName(), outputFolder)); FileMapper outputMapper = new FileMapper(outputFolder, false); diff --git a/website/scripts/utorrent-postprocess.groovy b/website/scripts/utorrent-postprocess.groovy index 80491eef..9fcd3643 100644 --- a/website/scripts/utorrent-postprocess.groovy +++ b/website/scripts/utorrent-postprocess.groovy @@ -11,7 +11,7 @@ if (ut_kind == "multi") { } // extract archives if necessary -input += extract(file:input) +input += extract(file:input, output:".", conflict:"override") // process only media files input = input.findAll{ it.isVideo() || it.isSubtitle() } @@ -79,6 +79,6 @@ groups.each{ group, files -> // make XBMC scan for new content xbmc.split(/[\s,|]+/).each{ - println "Notify XMBC: $it" + println "Notify XBMC: $it" invokeScanVideoLibrary(it) }