+
+ /**
+ * Fix the source cover to the given story cover.
+ *
+ * @param source
+ * the source to change
+ * @param coverImage
+ * the cover image
+ */
+ void setSourceCover(String source, Image coverImage) {
+ sourceCovers.put(source, coverImage);
+ File cover = new File(getExpectedDir(source), ".cover.png");
+ try {
+ Instance.getCache().saveAsImage(sourceCovers.get(source), cover,
+ true);
+ } catch (IOException e) {
+ Instance.getTraceHandler().error(e);
+ sourceCovers.remove(source);
+ }
+ }