From: Niki Roo Date: Fri, 3 Apr 2020 18:45:51 +0000 (+0200) Subject: e621: fix cover X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=12c180fc05c4b9672ac85181d1c98190f66347f9;p=fanfix-jexer.git e621: fix cover --- diff --git a/changelog-fr.md b/changelog-fr.md index b0bb4e9..b1785ef 100644 --- a/changelog-fr.md +++ b/changelog-fr.md @@ -2,13 +2,14 @@ # Version WIP -- new: MangaHub: un site de manga (English) -- new: MangaFox: retrait du support (site désagréable) +- MangaHub: new: un site de manga (English) +- MangaFox: retrait du support (site désagréable) +- e621: correction pour la cover non sauvée # Version 3.0.1 -- fix: update pour e621 (et ce n'est plus un BasicSupport_Deprecated) - fix: en cas d'URL non supportée, n'affiche plus un message d'erreur relatif à "file://" +- e621: update pour e621 (et ce n'est plus un BasicSupport_Deprecated) # Version 3.0.0 diff --git a/changelog.md b/changelog.md index e43c4ec..41f0988 100644 --- a/changelog.md +++ b/changelog.md @@ -2,8 +2,9 @@ # Version WIP -- new: MangaHub: a manga website (English) -- new: MangaFox removed (too many unfriendly changes, bye) +- MangaHub: a manga website (English) +- MangaFox: removed (too many unfriendly changes, bye) +- e621: fix cover not saved # Version 3.0.1 diff --git a/src/be/nikiroo/fanfix/supported/E621.java b/src/be/nikiroo/fanfix/supported/E621.java index 4b2fb90..94010a7 100644 --- a/src/be/nikiroo/fanfix/supported/E621.java +++ b/src/be/nikiroo/fanfix/supported/E621.java @@ -282,8 +282,12 @@ class E621 extends BasicSupport { Image image = null; List> chapters = getChapters(null); if (!chapters.isEmpty()) { - URL url = chapters.get(0).getValue(); - image = bsImages.getImage(this, url); + URL chap1Url = chapters.get(0).getValue(); + String imgsChap1 = getChapterContent(chap1Url, 1, null); + if (!imgsChap1.isEmpty()) { + imgsChap1 = imgsChap1.split("]")[0].substring(1).trim(); + image = bsImages.getImage(this, new URL(imgsChap1)); + } } return image;