X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FFimfictionApi.java;fp=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FFimfictionApi.java;h=c97ecf7d3e9ea2ff8a7cc782eea5bca660f9f265;hb=9a098d45a555e5d660c41e04f64e9445420cc025;hp=a64e4c082f4eccbe5e1ae9fcc88745306207a5fc;hpb=591b416adb9e1b213ae2aebce4796b723cf0c403;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/FimfictionApi.java b/src/be/nikiroo/fanfix/supported/FimfictionApi.java index a64e4c0..c97ecf7 100644 --- a/src/be/nikiroo/fanfix/supported/FimfictionApi.java +++ b/src/be/nikiroo/fanfix/supported/FimfictionApi.java @@ -147,12 +147,20 @@ class FimfictionApi extends BasicSupport { if (!coverImageLink.trim().isEmpty()) { URL coverImageUrl = new URL(coverImageLink.trim()); - InputStream in = Instance.getCache() - .open(coverImageUrl, this, true); + // No need to use the oauth, cookies... for the cover + // Plus: it crashes on Android because of the referer try { - meta.setCover(new Image(in)); - } finally { - in.close(); + InputStream in = Instance.getCache().open(coverImageUrl, null, + true); + try { + meta.setCover(new Image(in)); + } finally { + in.close(); + } + } catch (IOException e) { + Instance.getTraceHandler().error( + new IOException( + "Cannot get the story cover, ignoring...", e)); } }