X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FLibrary.java;h=602a25fd16e702dcea6e64fc79e479f9c9614884;hp=9864ad773d085527c28e1dba467bf7a01be6ca1b;hb=d3c15421430e85e3afeefef211b4f791753e17ba;hpb=361425558beb39232c122dbd4d0226f7f7049002 diff --git a/src/be/nikiroo/fanfix/Library.java b/src/be/nikiroo/fanfix/Library.java index 9864ad7..602a25f 100644 --- a/src/be/nikiroo/fanfix/Library.java +++ b/src/be/nikiroo/fanfix/Library.java @@ -230,18 +230,26 @@ public class Library { && !path.endsWith(format)) { MetaData meta = itSupport.processMeta( file.toURI().toURL()).getMeta(); - stories.put(meta, file); - - try { - int id = Integer.parseInt(meta.getLuid()); - if (id > lastId) { - lastId = id; + if (meta != null) { + stories.put(meta, file); + try { + int id = Integer.parseInt(meta + .getLuid()); + if (id > lastId) { + lastId = id; + } + } catch (Exception e) { + // not normal!! + Instance.syserr(new IOException( + "Cannot understand the LUID of " + + file.getPath() + ": " + + meta.getLuid(), e)); } - } catch (Exception e) { + } else { // not normal!! Instance.syserr(new IOException( - "Cannot read the LUID of: " - + file.getPath(), e)); + "Cannot get metadata for: " + + file.getPath())); } } } catch (IOException e) {