- private String getAuthor(InputStream in) {
- List<String> authors = new ArrayList<String>();
-
- String line = getLine(in, "/author/", 0, false);
- if (line != null) {
- for (String ln : StringUtils.unhtml(line).split(",")) {
- if (ln != null && !ln.trim().isEmpty()
- && !authors.contains(ln.trim())) {
- authors.add(ln.trim());
- }
- }
- }
-
- try {
- in.reset();
- } catch (IOException e) {
- Instance.syserr(e);
- }
-
- line = getLine(in, "/artist/", 0, false);
- if (line != null) {
- for (String ln : StringUtils.unhtml(line).split(",")) {
- if (ln != null && !ln.trim().isEmpty()
- && !authors.contains(ln.trim())) {
- authors.add(ln.trim());
- }
- }
- }
-
- if (authors.isEmpty()) {
- return null;
- }
-
- StringBuilder builder = new StringBuilder();
- for (String author : authors) {
- if (builder.length() > 0) {
- builder.append(", ");
+ private String getAuthors(String authorList) {
+ String author = "";
+ for (String auth : explode(authorList)) {
+ if (!author.isEmpty()) {
+ author = author + ", ";