From 76c54eff86f51689ab73d1b53796206d139d6fc3 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Mon, 15 Apr 2019 23:18:20 +0200 Subject: [PATCH] fix downloader spent input --- src/be/nikiroo/utils/Downloader.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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, -- 2.27.0