From 12c180fc05c4b9672ac85181d1c98190f66347f9 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 3 Apr 2020 20:45:51 +0200 Subject: [PATCH] e621: fix cover --- changelog-fr.md | 7 ++++--- changelog.md | 5 +++-- src/be/nikiroo/fanfix/supported/E621.java | 8 ++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/changelog-fr.md b/changelog-fr.md index b0bb4e92..b1785ef7 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 e43c4ec4..41f0988a 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 4b2fb902..94010a73 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; -- 2.27.0