This commit is contained in:
aj 2018-03-29 14:12:41 -07:00
commit caa408aadd
2 changed files with 6 additions and 5 deletions

View File

@ -50,6 +50,7 @@ public class AlbumView extends JFrame {
buttons.add(open);
buttons.add(viewArtist);
if (album.getWiki() != null)
buttons2.add(viewWiki);
if (album.getMbid() != null)

View File

@ -75,7 +75,6 @@ public class Parser {
return album;
}
return null;
}
public static Artist parseArtist(Document doc) {
@ -124,9 +123,9 @@ public class Parser {
content = node.getTextContent();
}
}
if(date != null && content != null)
wiki = new Wiki(date, summary, content);
if (date != null && content != null)
wiki = new Wiki(date, summary, content);
// if (wikiNodeList.item(0) != null) {
// String date = wikiNodeList.item(0).getFirstChild().getTextContent();
//
@ -224,13 +223,14 @@ public class Parser {
}
public static Track parseLastTrack(Document doc) {
if (doc.getDocumentElement().getAttribute("status").equals("ok")) {
String name = doc.getElementsByTagName("name").item(0).getTextContent();
// System.out.println(name);
String artistName = doc.getElementsByTagName("artist").item(0).getTextContent();
String albumName = doc.getElementsByTagName("album").item(0).getTextContent();
// System.out.println(albumName);
Track track = Track.getTrack(name, artistName, Reference.getUserName());
Album album = Album.getAlbum(albumName, artistName, Reference.getUserName());