aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-03-08 18:35:31 -0700
committerScott Jackson <daneren2005@gmail.com>2015-03-08 18:35:31 -0700
commit74c9732da9c23d3e69432a3fa14a971558ed9c20 (patch)
tree827d00023422574584c47fbf597959ca23e8b3d9 /src/github
parentb2ea0d0f28a9c583234fc1d83115b514db7c049f (diff)
downloaddsub-74c9732da9c23d3e69432a3fa14a971558ed9c20.tar.gz
dsub-74c9732da9c23d3e69432a3fa14a971558ed9c20.tar.bz2
dsub-74c9732da9c23d3e69432a3fa14a971558ed9c20.zip
#389 Add artist radio for Madsonic. Madsonic has the ability to radio off individual songs, but we are not going to expose that just for Madsonic.
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java6
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java13
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 {