From: Niki Roo Date: Mon, 15 Apr 2019 16:59:13 +0000 (+0200) Subject: code cleanup X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=d4a992bf4e8488edb3316e528c8f9b9319f875bf;p=fanfix-jexer.git code cleanup --- diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderBookInfo.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderBookInfo.java index a5743c7..3c5cc8a 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderBookInfo.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderBookInfo.java @@ -127,7 +127,15 @@ public class GuiReaderBookInfo { public Image getBaseImage(BasicLibrary lib) { switch (type) { case STORY: - return lib.getCover(meta.getLuid()); + if (meta.getCover() != null) { + return meta.getCover(); + } + + if (meta.getLuid() != null) { + return lib.getCover(meta.getLuid()); + } + + return null; case SOURCE: return lib.getSourceCover(value); case AUTHOR: @@ -150,6 +158,9 @@ public class GuiReaderBookInfo { if (uid == null || uid.trim().isEmpty()) { uid = meta.getLuid(); } + if (uid == null || uid.trim().isEmpty()) { + uid = meta.getUrl(); + } GuiReaderBookInfo info = new GuiReaderBookInfo(Type.STORY, uid, meta.getTitle());