From: Niki Roo Date: Thu, 6 Jul 2017 20:23:06 +0000 (+0200) Subject: Update to latest version of nikiroo-utils X-Git-Tag: fanfix-1.6.0~17 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=326093dc53fa48019c94f59bd006b307d755b392;p=fanfix.git Update to latest version of nikiroo-utils --- diff --git a/changelog.md b/changelog.md index a27f9c8..cfcfb82 100644 --- a/changelog.md +++ b/changelog.md @@ -1,21 +1,27 @@ # Fanfix ## Version WIP + - New reader type: TUI (a text user interface with windows and menus) - A server option to offer stories on the network - A remote library to get said stories from the network +- Update to latest version of nikiroo-utils ## Version 1.5.3 + - FimFiction: Fix tags and chapter handling for some stories ## Version 1.5.2 + - Fix tags metadata on FimFiction 4 ## Version 1.5.1 + - Update to FimFiction 4 - Fix some meta data that were missing on e-Hentai ## Version 1.5.0 + - New website supported following a request: e-hentai.org - Library: perf improvement when retrieving the stories (cover not loaded when not needed) - Library: fix the covers that were not always removed when deleting a story diff --git a/libs/nikiroo-utils-1.6.1-sources.jar b/libs/nikiroo-utils-1.6.1-sources.jar deleted file mode 100644 index 66f6734..0000000 Binary files a/libs/nikiroo-utils-1.6.1-sources.jar and /dev/null differ diff --git a/libs/nikiroo-utils-2.0.0-sources.jar b/libs/nikiroo-utils-2.0.0-sources.jar new file mode 100644 index 0000000..26cad68 Binary files /dev/null and b/libs/nikiroo-utils-2.0.0-sources.jar differ diff --git a/src/be/nikiroo/fanfix/Cache.java b/src/be/nikiroo/fanfix/Cache.java index 632c844..f7e1a81 100644 --- a/src/be/nikiroo/fanfix/Cache.java +++ b/src/be/nikiroo/fanfix/Cache.java @@ -26,6 +26,7 @@ import javax.imageio.ImageIO; import be.nikiroo.fanfix.bundles.Config; import be.nikiroo.fanfix.supported.BasicSupport; import be.nikiroo.utils.IOUtils; +import be.nikiroo.utils.ImageUtils; import be.nikiroo.utils.MarkableFileInputStream; /** @@ -319,7 +320,7 @@ public class Cache { if (!cached.exists() || isOld(cached, true)) { InputStream imageIn = open(url, null, true); - ImageIO.write(IOUtils.toImage(imageIn), Instance.getConfig() + ImageIO.write(ImageUtils.fromStream(imageIn), Instance.getConfig() .getString(Config.IMAGE_FORMAT_CONTENT).toLowerCase(), cached); } diff --git a/src/be/nikiroo/fanfix/reader/GuiReaderBook.java b/src/be/nikiroo/fanfix/reader/GuiReaderBook.java index 2a4266d..1334518 100644 --- a/src/be/nikiroo/fanfix/reader/GuiReaderBook.java +++ b/src/be/nikiroo/fanfix/reader/GuiReaderBook.java @@ -27,7 +27,7 @@ import javax.swing.JPanel; import be.nikiroo.fanfix.Instance; import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.data.Story; -import be.nikiroo.utils.IOUtils; +import be.nikiroo.utils.ImageUtils; import be.nikiroo.utils.ui.UIUtils; /** @@ -370,7 +370,7 @@ class GuiReaderBook extends JPanel { InputStream in = Instance.getCache().getFromCache(id); if (in != null) { try { - resizedImage = IOUtils.toImage(in); + resizedImage = ImageUtils.fromStream(in); in.close(); in = null; } catch (IOException e) { diff --git a/src/be/nikiroo/fanfix/supported/BasicSupport.java b/src/be/nikiroo/fanfix/supported/BasicSupport.java index fbdb47a..fc6bbd2 100644 --- a/src/be/nikiroo/fanfix/supported/BasicSupport.java +++ b/src/be/nikiroo/fanfix/supported/BasicSupport.java @@ -25,7 +25,7 @@ import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.data.Paragraph; import be.nikiroo.fanfix.data.Paragraph.ParagraphType; import be.nikiroo.fanfix.data.Story; -import be.nikiroo.utils.IOUtils; +import be.nikiroo.utils.ImageUtils; import be.nikiroo.utils.Progress; import be.nikiroo.utils.StringUtils; @@ -863,7 +863,7 @@ public abstract class BasicSupport { InputStream in = null; try { in = Instance.getCache().open(url, getSupport(url), true); - return IOUtils.toImage(in); + return ImageUtils.fromStream(in); } catch (IOException e) { } finally { if (in != null) { diff --git a/src/be/nikiroo/fanfix/supported/Epub.java b/src/be/nikiroo/fanfix/supported/Epub.java index 6cfe4f3..0bd09bd 100644 --- a/src/be/nikiroo/fanfix/supported/Epub.java +++ b/src/be/nikiroo/fanfix/supported/Epub.java @@ -15,6 +15,7 @@ import java.util.zip.ZipInputStream; import be.nikiroo.fanfix.Instance; import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.utils.IOUtils; +import be.nikiroo.utils.ImageUtils; import be.nikiroo.utils.MarkableFileInputStream; import be.nikiroo.utils.Progress; @@ -114,7 +115,7 @@ class Epub extends InfoText { // Cover if (getCover()) { try { - cover = IOUtils.toImage(zipIn); + cover = ImageUtils.fromStream(zipIn); } catch (Exception e) { Instance.syserr(e); } diff --git a/src/be/nikiroo/fanfix/supported/MangaFox.java b/src/be/nikiroo/fanfix/supported/MangaFox.java index a379e87..c8eaa1d 100644 --- a/src/be/nikiroo/fanfix/supported/MangaFox.java +++ b/src/be/nikiroo/fanfix/supported/MangaFox.java @@ -13,7 +13,7 @@ import java.util.Scanner; import be.nikiroo.fanfix.Instance; import be.nikiroo.fanfix.data.MetaData; -import be.nikiroo.utils.IOUtils; +import be.nikiroo.utils.ImageUtils; import be.nikiroo.utils.Progress; import be.nikiroo.utils.StringUtils; @@ -186,7 +186,7 @@ class MangaFox extends BasicSupport { try { coverIn = openEx(cover); try { - return IOUtils.toImage(coverIn); + return ImageUtils.fromStream(coverIn); } finally { coverIn.close(); }