* make sure the script works even if 7zip bindings fail
This commit is contained in:
parent
2834fa76d5
commit
55a32284e5
|
@ -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
|
||||
|
|
|
@ -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") }
|
||||
|
||||
|
|
Loading…
Reference in New Issue