diff options
Diffstat (limited to 'src/github')
3 files changed, 10 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index e8f2b665..4b0fed21 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -513,7 +513,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter SelectDirectoryFragment.this.name = dir.getName();
} else if(id != null && directory == null && dir.getParent() != null) {
// View Album, try to lookup parent to get a complete entry to use for starring
- MusicDirectory parentDir = getMusicDirectory(dir.getParent(), name, refresh, service, this);
+ MusicDirectory parentDir = getMusicDirectory(dir.getParent(), name, refresh, true, service, this);
for(Entry child: parentDir.getChildren()) {
if(id.equals(child.getId())) {
directory = child;
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 5a190439..6128e4ee 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -943,8 +943,11 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR }
protected MusicDirectory getMusicDirectory(String id, String name, boolean refresh, MusicService service, ProgressListener listener) throws Exception {
+ return getMusicDirectory(id, name, refresh, false, service, listener);
+ }
+ protected MusicDirectory getMusicDirectory(String id, String name, boolean refresh, boolean forceArtist, MusicService service, ProgressListener listener) throws Exception {
if(Util.isTagBrowsing(context) && !Util.isOffline(context)) {
- if(artist && !artistOverride) {
+ if(artist && !artistOverride || forceArtist) {
return service.getArtist(id, name, refresh, context, listener);
} else {
return service.getAlbum(id, name, refresh, context, listener);
diff --git a/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java b/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java index a5500505..9e5b48b4 100644 --- a/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java +++ b/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java @@ -81,7 +81,11 @@ public class MusicDirectoryParser extends MusicDirectoryEntryParser { } else if ("directory".equals(name) || "artist".equals(name) || ("album".equals(name) && !isArtist)) { dir.setName(get("name")); dir.setId(get("id")); - dir.setParent(get("parent")); + if(Util.isTagBrowsing(context, instance)) { + dir.setParent(get("artistId")); + } else { + dir.setParent(get("parent")); + } isArtist = true; } else if("album".equals(name)) { Entry entry = parseEntry(artist); |