NfoLyzer nfoLyzer = new NfoLyzer();
for (Folder f : list) { // for all folders,
s = f.size();
NfoLyzeResult result = new NfoLyzeResult(f); // one nfo result per folder...
for (int i = 0; i < s; i++) { // iterate files,
c = f.get(i);
if (c instanceof NfoFile) { // find nfos
try {
if (!nfoLyzer.parseNfo(result, (NfoFile) c)) {
System.out.println("No parser for " + c.pathString() + ", trying next nfo.");
continue;
} else {
// parse success => validate, create & save album data
// set repository object candidates and the status of all index fields
assignMatchStati(result, repository); // find known or similar entries & set stati accordingly
// some post-processing
postProcess(result);
if(confirmInteraction.confirm((NfoFile) c, result)) {
// confirmed => convert to Album data & persist!
ReleaseData d = NfoDataFactory.fromNfo(result, repository);
System.out.println(d);
} else {
System.out.println("DECLINED!");
}
break; // cancel nfo discovery
}
}catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch(RuntimeException e) {
System.out.println(e.getMessage());
}
}
}
if (result.getMatches().isEmpty()) {
System.out.println("Folder parser required for " + f.pathString());
}
}
}