From 8ab225e2cd3f9393bdd592654811a5275440a342 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 20 Jan 2014 11:26:58 -0800 Subject: Fix Show Artist for tags --- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 1 + .../daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 8e9dbbb9..e4cb3d81 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -1110,6 +1110,7 @@ public class SubsonicFragment extends Fragment { Bundle args = new Bundle(); args.putString(Constants.INTENT_EXTRA_NAME_ID, entry.getParent()); args.putString(Constants.INTENT_EXTRA_NAME_NAME, entry.getArtist()); + args.putBoolean(Constants.INTENT_EXTRA_NAME_ARTIST, true); fragment.setArguments(args); replaceFragment(fragment, getRootId(), true); diff --git a/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java b/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java index e58427f5..94aaa8c4 100644 --- a/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java +++ b/src/github/daneren2005/dsub/service/parser/MusicDirectoryEntryParser.java @@ -33,6 +33,12 @@ public class MusicDirectoryEntryParser extends AbstractParser { MusicDirectory.Entry entry = new MusicDirectory.Entry(); entry.setId(get("id")); entry.setParent(get("parent")); + if(entry.getParent() == null) { + entry.setParent(get("albumId")); + if(entry.getParent() == null) { + entry.setParent(get("artistId")); + } + } entry.setTitle(get("title")); if(entry.getTitle() == null) { entry.setTitle(get("name")); -- cgit v1.2.3