* improved error reporting
This commit is contained in:
parent
59a44ea8ff
commit
b509f108d0
|
@ -52,7 +52,7 @@ names += anime.findResults{ it.getPrimaryTitle() }
|
||||||
names += anime.findResults{ it.getOfficialTitle('en') }
|
names += anime.findResults{ it.getOfficialTitle('en') }
|
||||||
|
|
||||||
names = names.findAll{ it =~ /^[A-Z0-9]/ && it =~ /[\p{Alpha}]{3}/}.findResults{ net.sourceforge.filebot.similarity.Normalization.normalizePunctuation(it) }
|
names = names.findAll{ it =~ /^[A-Z0-9]/ && it =~ /[\p{Alpha}]{3}/}.findResults{ net.sourceforge.filebot.similarity.Normalization.normalizePunctuation(it) }
|
||||||
names = names*.toLowerCase().sort().unique()
|
names = names.sort().unique()
|
||||||
|
|
||||||
|
|
||||||
gz(s_out, names)
|
gz(s_out, names)
|
||||||
|
|
|
@ -4,4 +4,4 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||||
dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
|
||||||
dir_app=$dir_bin/../Resources/Java
|
dir_app=$dir_bin/../Resources/Java
|
||||||
java -Dapplication.deployment=app "-Djna.library.path=$dir_app" -Xmx256m -jar "$dir_app/FileBot.jar" "$@"
|
java -Dapplication.deployment=app "-Djna.library.path=$dir_app" "-Djava.library.path=$dir_app" -Xmx256m -jar "$dir_app/FileBot.jar" "$@"
|
||||||
|
|
|
@ -80,12 +80,12 @@ class ExtractTool extends Tool<TableModel> {
|
||||||
protected TableModel createModelInBackground(FolderNode sourceModel) throws InterruptedException {
|
protected TableModel createModelInBackground(FolderNode sourceModel) throws InterruptedException {
|
||||||
List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>();
|
List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>();
|
||||||
|
|
||||||
|
try {
|
||||||
for (Iterator<File> iterator = sourceModel.fileIterator(); iterator.hasNext();) {
|
for (Iterator<File> iterator = sourceModel.fileIterator(); iterator.hasNext();) {
|
||||||
File file = iterator.next();
|
File file = iterator.next();
|
||||||
|
|
||||||
// ignore non-archives files and trailing multi-volume parts
|
// ignore non-archives files and trailing multi-volume parts
|
||||||
if (Archive.VOLUME_ONE_FILTER.accept(file)) {
|
if (Archive.VOLUME_ONE_FILTER.accept(file)) {
|
||||||
try {
|
|
||||||
Archive archive = new Archive(file);
|
Archive archive = new Archive(file);
|
||||||
try {
|
try {
|
||||||
for (File it : archive.listFiles()) {
|
for (File it : archive.listFiles()) {
|
||||||
|
@ -94,13 +94,6 @@ class ExtractTool extends Tool<TableModel> {
|
||||||
} finally {
|
} finally {
|
||||||
archive.close();
|
archive.close();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
// unwind thread, if we have been cancelled
|
|
||||||
if (findCause(e, InterruptedException.class) != null) {
|
|
||||||
throw findCause(e, InterruptedException.class);
|
|
||||||
}
|
|
||||||
UILogger.log(Level.WARNING, e.getMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// unwind thread, if we have been cancelled
|
// unwind thread, if we have been cancelled
|
||||||
|
@ -108,6 +101,13 @@ class ExtractTool extends Tool<TableModel> {
|
||||||
throw new InterruptedException();
|
throw new InterruptedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// unwind thread, if we have been cancelled
|
||||||
|
if (findCause(e, InterruptedException.class) != null) {
|
||||||
|
throw findCause(e, InterruptedException.class);
|
||||||
|
}
|
||||||
|
UILogger.log(Level.WARNING, e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
return new ArchiveEntryModel(entries);
|
return new ArchiveEntryModel(entries);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue