* make sure the script works even if 7zip bindings fail

This commit is contained in:
Reinhard Pointner 2012-08-13 08:03:11 +00:00
parent 2834fa76d5
commit 55a32284e5
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ try {
// 7-Zip-JBinding: OK
try {
print '7-Zip-JBinding: '
ClassLoader.systemClassLoader.loadClass("net.sourceforge.filebot.archive.SevenZipLoader") // load 7-Zip-JBinding native libs
net.sourceforge.filebot.archive.SevenZipLoader.requireNativeLibraries() // load 7-Zip-JBinding native libs
println "OK"
} catch(Throwable error) {
println error

View File

@ -51,15 +51,15 @@ if (args.empty) {
// extract archives (zip, rar, etc) that contain at least one video file
input += extract(file: input.findAll{ it.isArchive() }, output: null, conflict: 'override', filter: { it.isVideo() }, forceExtractAll: true)
// sanitize input
input = input.findAll{ it?.exists() }.collect{ it.canonicalFile }.unique()
// process only media files
input = input.findAll{ it.isVideo() || it.isSubtitle() }
// ignore clutter files
input = input.findAll{ !(it.path =~ /\b(?i:sample|trailer|extras|deleted.scenes|music.video|scrapbook)\b/) }
// sanitize input
input = input.findAll{ it.exists() }.collect{ it.canonicalFile }.unique()
// print input fileset
input.each{ f -> _log.finest("Input: $f") }