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 {
* @return the list of {@link Object}s
*/
static List<Object> breakStory(Story story) {
- System.out.println("Story to break: "+story);
-
List<Object> list = new ArrayList<Object>();
story = story.clone();
}
}
- System.out.println("rebuilt story: "+story);
return story;
}