diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-01-20 11:36:20 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-01-20 11:36:20 -0800 |
commit | 35ee7293c9ee8364795607ee3571f4010dab509e (patch) | |
tree | 02d9f5cced7917faa4fbc13aaef4b29e26b78228 /src | |
parent | 8ab225e2cd3f9393bdd592654811a5275440a342 (diff) | |
download | dsub-35ee7293c9ee8364795607ee3571f4010dab509e.tar.gz dsub-35ee7293c9ee8364795607ee3571f4010dab509e.tar.bz2 dsub-35ee7293c9ee8364795607ee3571f4010dab509e.zip |
Fix Show Album as well
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java b/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java index 94aaa8c4..b9a77aa8 100644 --- a/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java +++ b/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java @@ -32,12 +32,15 @@ public class MusicDirectoryEntryParser extends AbstractParser { protected MusicDirectory.Entry parseEntry(String artist) { MusicDirectory.Entry entry = new MusicDirectory.Entry(); entry.setId(get("id")); - entry.setParent(get("parent")); + String albumId = get("albumId"); + if(albumId != null) { + entry.setParent(albumId); + entry.setGrandParent(get("artistId")); + } else { + entry.setParent(get("parent")); + } if(entry.getParent() == null) { - entry.setParent(get("albumId")); - if(entry.getParent() == null) { - entry.setParent(get("artistId")); - } + entry.setParent(get("artistId")); } entry.setTitle(get("title")); if(entry.getTitle() == null) { |