- meta.setTitle(getTitle(reset(in)));
- meta.setAuthor(getAuthor(reset(in)));
- meta.setDate(getDate(reset(in)));
- meta.setTags(getTags(reset(in)));
- meta.setSource(getSourceName());
- meta.setUrl(source.toString());
- meta.setPublisher(getSourceName());
- meta.setUuid(source.toString());
+ Element title = doc.getElementById("title");
+ Elements table = null;
+ if (title != null) {
+ table = title.getElementsByTag("table");
+ }
+ if (table != null) {
+ // Rows: header, data
+ Elements rows = table.first().getElementsByTag("tr");
+ if (rows.size() > 1) {
+ table = rows.get(1).getElementsByTag("td");
+ // Columns: Realeased, Authors, Artists, Genres
+ if (table.size() < 4) {
+ table = null;
+ }
+ }
+ }
+
+ meta.setTitle(getTitle());
+ if (table != null) {
+ meta.setAuthor(getAuthors(table.get(1).text() + ","
+ + table.get(2).text()));
+
+ meta.setDate(StringUtils.unhtml(table.get(0).text()).trim());
+ meta.setTags(explode(table.get(3).text()));
+ }
+ meta.setSource(getType().getSourceName());
+ meta.setUrl(getSource().toString());
+ meta.setPublisher(getType().getSourceName());
+ meta.setUuid(getSource().toString());