Update nikiroo-utils, remove Instance.syserr/trace
[nikiroo-utils.git] / src / be / nikiroo / fanfix / output / InfoCover.java
index 7db2a1cf5f5f9d2c5aba9b0bfb8696d11190d9f2..a1b37913bc9e44789eb3d29801b88bc94362a0ad 100644 (file)
@@ -12,7 +12,7 @@ import be.nikiroo.fanfix.Instance;
 import be.nikiroo.fanfix.bundles.Config;
 import be.nikiroo.fanfix.data.MetaData;
 
-class InfoCover {
+public class InfoCover {
        public static void writeInfo(File targetDir, String targetName,
                        MetaData meta) throws IOException {
                File info = new File(targetDir, targetName + ".info");
@@ -57,6 +57,8 @@ class InfoCover {
                                writeMeta(infoWriter, "WORDCOUNT",
                                                Long.toString(meta.getWords()));
                                writeMeta(infoWriter, "CREATION_DATE", meta.getCreationDate());
+                               writeMeta(infoWriter, "FAKE_COVER",
+                                               Boolean.toString(meta.isFakeCover()));
                        } finally {
                                infoWriter.close();
                        }
@@ -73,8 +75,8 @@ class InfoCover {
                                                targetName + "." + format));
                        } catch (IOException e) {
                                // Allow to continue without cover
-                               Instance.syserr(new IOException(
-                                               "Failed to save the cover image", e));
+                               Instance.getTraceHandler().error(
+                                               new IOException("Failed to save the cover image", e));
                        }
                }
        }