aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-23 13:57:22 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-23 13:57:22 -0800
commit7f62d8ad74b35fe43e10f9e6083537220d107e42 (patch)
tree57f7977601b0d408d4a7bbb6deeb665fc6147654
parenta05ab3a268382c1be40a61cb289494814ea7ba7c (diff)
parent38f386015e8a3cd8f2396cf3af24b1b7b1827645 (diff)
downloaddsub-7f62d8ad74b35fe43e10f9e6083537220d107e42.tar.gz
dsub-7f62d8ad74b35fe43e10f9e6083537220d107e42.tar.bz2
dsub-7f62d8ad74b35fe43e10f9e6083537220d107e42.zip
Merge branch 'master' into DLNA
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java5
-rw-r--r--src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java6
3 files changed, 11 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 6d94327c..4b0fed21 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -217,7 +217,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
if(licenseValid == null) {
menuInflater.inflate(R.menu.empty, menu);
- } else if(albumListType != null) {
+ } else if(albumListType != null && !"starred".equals(albumListType)) {
menuInflater.inflate(R.menu.select_album_list, menu);
} else if(artist && !showAll) {
menuInflater.inflate(R.menu.select_album, menu);
@@ -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);