git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some CBZ cover/fake cover issues
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
LocalLibrary.java
diff --git
a/src/be/nikiroo/fanfix/library/LocalLibrary.java
b/src/be/nikiroo/fanfix/library/LocalLibrary.java
index 11c36630adcef96ea73d17c8712d84495260299a..e6018dfc20654a0f9b109032a1acf427586da6d5 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/LocalLibrary.java
+++ b/
src/be/nikiroo/fanfix/library/LocalLibrary.java
@@
-122,7
+122,7
@@
public class LocalLibrary extends BasicLibrary {
meta = InfoReader.readMeta(infoFile, true);
return meta.getCover();
} catch (IOException e) {
meta = InfoReader.readMeta(infoFile, true);
return meta.getCover();
} catch (IOException e) {
- Instance.
syser
r(e);
+ Instance.
getTraceHandler().erro
r(e);
}
}
}
}
}
}
@@
-157,7
+157,7
@@
public class LocalLibrary extends BasicLibrary {
File expectedTarget = getExpectedFile(meta);
expectedTarget.getParentFile().mkdirs();
File expectedTarget = getExpectedFile(meta);
expectedTarget.getParentFile().mkdirs();
- BasicOutput it = BasicOutput.getOutput(getOutputType(meta), true);
+ BasicOutput it = BasicOutput.getOutput(getOutputType(meta), true
, true
);
it.process(story, expectedTarget.getPath(), pg);
return story;
it.process(story, expectedTarget.getPath(), pg);
return story;
@@
-183,7
+183,7
@@
public class LocalLibrary extends BasicLibrary {
InfoCover.writeInfo(newDir, name, meta);
relatedFile.delete();
} catch (IOException e) {
InfoCover.writeInfo(newDir, name, meta);
relatedFile.delete();
} catch (IOException e) {
- Instance.
syser
r(e);
+ Instance.
getTraceHandler().erro
r(e);
}
} else {
relatedFile.renameTo(new File(newDir, relatedFile.getName()));
}
} else {
relatedFile.renameTo(new File(newDir, relatedFile.getName()));
@@
-209,7
+209,7
@@
public class LocalLibrary extends BasicLibrary {
try {
ImageIO.write(sourceCovers.get(source), "png", cover);
} catch (IOException e) {
try {
ImageIO.write(sourceCovers.get(source), "png", cover);
} catch (IOException e) {
- Instance.
syser
r(e);
+ Instance.
getTraceHandler().erro
r(e);
sourceCovers.remove(source);
}
}
sourceCovers.remove(source);
}
}
@@
-383,7
+383,8
@@
public class LocalLibrary extends BasicLibrary {
}
String coverExt = "."
}
String coverExt = "."
- + Instance.getConfig().getString(Config.IMAGE_FORMAT_COVER);
+ + Instance.getConfig().getString(Config.IMAGE_FORMAT_COVER)
+ .toLowerCase();
File coverFile = new File(path + coverExt);
if (!coverFile.exists()) {
coverFile = new File(path.substring(0,
File coverFile = new File(path + coverExt);
if (!coverFile.exists()) {
coverFile = new File(path.substring(0,
@@
-472,8
+473,10
@@
public class LocalLibrary extends BasicLibrary {
} catch (IOException e) {
// We should not have not-supported files in the
// library
} catch (IOException e) {
// We should not have not-supported files in the
// library
- Instance.syserr(new IOException(
- "Cannot load file from library: " + infoFile, e));
+ Instance.getTraceHandler().error(
+ new IOException(
+ "Cannot load file from library: "
+ + infoFile, e));
}
pgFiles.add(1);
}
}
pgFiles.add(1);
}
@@
-489,7
+492,7
@@
public class LocalLibrary extends BasicLibrary {
in.close();
}
} catch (IOException e) {
in.close();
}
} catch (IOException e) {
- Instance.
syser
r(e);
+ Instance.
getTraceHandler().erro
r(e);
}
}
}
}
@@
-516,7
+519,7
@@
public class LocalLibrary extends BasicLibrary {
try {
ImageIO.write(sourceCovers.get(source), "png", cover);
} catch (IOException e) {
try {
ImageIO.write(sourceCovers.get(source), "png", cover);
} catch (IOException e) {
- Instance.
syser
r(e);
+ Instance.
getTraceHandler().erro
r(e);
sourceCovers.remove(source);
}
}
sourceCovers.remove(source);
}
}