* extract: make --output path relative to archive file
This commit is contained in:
parent
36a7eb5e5a
commit
1f10c59364
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue