improve perf for getCover
authorNiki Roo <niki@nikiroo.be>
Sat, 16 Mar 2019 19:27:24 +0000 (20:27 +0100)
committerNiki Roo <niki@nikiroo.be>
Sat, 16 Mar 2019 19:27:24 +0000 (20:27 +0100)
src/be/nikiroo/fanfix/library/LocalLibrary.java

index 50f9ac01fe902f272255e96da1facbd117a85178..93bf7ba2f995cff5f12e74f109d648f0c72f603c 100644 (file)
@@ -123,6 +123,10 @@ public class LocalLibrary extends BasicLibrary {
        public Image getCover(String luid) {
                MetaData meta = getInfo(luid);
                if (meta != null) {
+                       if (meta.getCover() != null) {
+                               return meta.getCover();
+                       }
+
                        File[] files = getStories(null).get(meta);
                        if (files != null) {
                                File infoFile = files[0];