+ public synchronized Image getCustomAuthorCover(String author) {
+ if (authorCovers == null) {
+ authorCovers = new HashMap<String, Image>();
+ }
+
+ Image img = authorCovers.get(author);
+ if (img != null) {
+ return img;
+ }
+
+ File cover = getAuthorCoverFile(author);
+ if (cover.exists()) {
+ InputStream in;
+ try {
+ in = new FileInputStream(cover);
+ try {
+ authorCovers.put(author, new Image(in));
+ } finally {
+ in.close();
+ }
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ Instance.getInstance().getTraceHandler()
+ .error(new IOException("Cannot load the existing custom author cover: " + cover, e));
+ }
+ }
+
+ return authorCovers.get(author);
+ }
+
+ @Override
+ public void setSourceCover(String source, String luid) throws IOException {