From: Niki Roo Date: Mon, 15 Apr 2019 21:18:20 +0000 (+0200) Subject: fix downloader spent input X-Git-Tag: fanfix-3.0.1~29^2~151 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=76c54eff86f51689ab73d1b53796206d139d6fc3;p=fanfix.git fix downloader spent input --- diff --git a/src/be/nikiroo/utils/Downloader.java b/src/be/nikiroo/utils/Downloader.java index efc6a98..1ec4379 100644 --- a/src/be/nikiroo/utils/Downloader.java +++ b/src/be/nikiroo/utils/Downloader.java @@ -334,9 +334,11 @@ public class Downloader { } if (in != null && cache != null) { - tracer.trace("Save to cache: " + url); + tracer.trace("Save to cache: " + originalUrl); try { - cache.save(in, url); + cache.save(in, originalUrl); + in.close(); + in = cache.load(originalUrl, true, false); } catch (IOException e) { tracer.error(new IOException( "Cannot save URL to cache, will ignore cache: " + url,