X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FE621.java;h=45c110f283ebaf825d5f7c65361917333f69add9;hb=7d0d2be6b0e9bd4e03ac8a7d749f49d6d1436242;hp=bc6ba5b1501e83a1c1afbbdf38e6804d7147fdf7;hpb=68686a37a591a767f6d1af428ea0d5f3d3a1ddc1;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/E621.java b/src/be/nikiroo/fanfix/supported/E621.java index bc6ba5b..45c110f 100644 --- a/src/be/nikiroo/fanfix/supported/E621.java +++ b/src/be/nikiroo/fanfix/supported/E621.java @@ -39,6 +39,7 @@ class E621 extends BasicSupport { meta.setDate(""); meta.setTags(new ArrayList()); // TODDO ??? meta.setSource(getSourceName()); + meta.setUrl(source.toString()); meta.setPublisher(getSourceName()); meta.setUuid(source.toString()); meta.setLuid(""); @@ -95,24 +96,28 @@ class E621 extends BasicSupport { author = author.substring(0, pos - 1); String page = source.getProtocol() + "://" + source.getHost() + author; - InputStream pageIn = Instance.getCache().open( - new URL(page), this, false); try { - key = "class=\"tag-type-artist\""; - author = getLine(pageIn, key, 0); - if (author != null) { - pos = author.indexOf("= 0) { - author = author.substring(pos); - pos = author.indexOf(""); + InputStream pageIn = Instance.getCache().open( + new URL(page), this, false); + try { + key = "class=\"tag-type-artist\""; + author = getLine(pageIn, key, 0); + if (author != null) { + pos = author.indexOf("= 0) { - author = author.substring(0, pos); - return StringUtils.unhtml(author); + author = author.substring(pos); + pos = author.indexOf(""); + if (pos >= 0) { + author = author.substring(0, pos); + return StringUtils.unhtml(author); + } } } + } finally { + pageIn.close(); } - } finally { - pageIn.close(); + } catch (Exception e) { + // No author found } } }