git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
591b416
)
fix FimFictionApi error on Android
author
Niki Roo
<niki@nikiroo.be>
Sun, 26 May 2019 17:53:05 +0000
(19:53 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Sun, 26 May 2019 17:53:05 +0000
(19:53 +0200)
src/be/nikiroo/fanfix/supported/FimfictionApi.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/fanfix/supported/FimfictionApi.java
b/src/be/nikiroo/fanfix/supported/FimfictionApi.java
index a64e4c082f4eccbe5e1ae9fcc88745306207a5fc..c97ecf7d3e9ea2ff8a7cc782eea5bca660f9f265 100644
(file)
--- 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());
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 {
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));
}
}
}
}