diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 6 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/service/RESTMusicService.java | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 914932d7..1791cc49 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -228,9 +228,11 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter if(!ServerInfo.isMadsonic(context)) {
menu.removeItem(R.id.menu_top_tracks);
}
- if(!ServerInfo.checkServerVersion(context, "1.11") || !ServerInfo.isStockSubsonic(context) || (id != null && "root".equals(id))) {
- menu.removeItem(R.id.menu_similar_artists);
+ if(!ServerInfo.checkServerVersion(context, "1.11") || (id != null && "root".equals(id))) {
menu.removeItem(R.id.menu_radio);
+ menu.removeItem(R.id.menu_similar_artists);
+ } else if(ServerInfo.isMadsonic(context)) {
+ menu.removeItem(R.id.menu_similar_artists);
}
} else {
if(podcastId == null) {
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java index 036cb0ca..2f714d91 100644 --- a/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -586,7 +586,18 @@ public class RESTMusicService implements MusicService { values.add(size); int instance = getInstance(context); - Reader reader = getReader(context, progressListener, Util.isTagBrowsing(context, instance) ? "getSimilarSongs2" : "getSimilarSongs", null, names, values); + String method; + if(ServerInfo.isMadsonic(context, instance)) { + method = "getPandoraSongs"; + } else { + if (Util.isTagBrowsing(context, instance)) { + method = "getSimilarSongs2"; + } else { + method = "getSimilarSongs"; + } + } + + Reader reader = getReader(context, progressListener, method, null, names, values); try { return new RandomSongsParser(context, instance).parse(reader, progressListener); } finally { |