this.lastId = 0;
this.stories = null;
- this.sourceCovers = new HashMap<String, Image>();
+ this.sourceCovers = null;
baseDir.mkdirs();
}
@Override
protected void deleteInfo(String luid) {
stories = null;
- sourceCovers = new HashMap<String, Image>();
+ sourceCovers = null;
}
@Override
@Override
public Image getSourceCover(String source) {
+ if (sourceCovers == null) {
+ getStories(null);
+ }
+
if (!sourceCovers.containsKey(source)) {
sourceCovers.put(source, super.getSourceCover(source));
}
@Override
public void setSourceCover(String source, String luid) {
+ if (sourceCovers == null) {
+ getStories(null);
+ }
+
sourceCovers.put(source, getCover(luid));
File cover = new File(getExpectedDir(source), ".cover");
try {
}
super.imprt(other, luid, pg);
-
- deleteInfo();
}
/**
if (stories == null) {
stories = new HashMap<MetaData, File[]>();
+ sourceCovers = new HashMap<String, Image>();
lastId = 0;
* the cover image
*/
void setSourceCover(String source, Image coverImage) {
+ if (sourceCovers == null) {
+ getStories(null);
+ }
+
sourceCovers.put(source, coverImage);
File cover = new File(getExpectedDir(source), ".cover");
try {