aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-04 13:13:14 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-04 13:13:14 -0800
commit6a62b5d859c202f48ceff89612538702210e2b9a (patch)
treebfd64d103520335b04e1dc4786b97ca4d7600f28 /src/github
parent8a412ca3ace26f543dffa8ae88644b86682dd42c (diff)
downloaddsub-6a62b5d859c202f48ceff89612538702210e2b9a.tar.gz
dsub-6a62b5d859c202f48ceff89612538702210e2b9a.tar.bz2
dsub-6a62b5d859c202f48ceff89612538702210e2b9a.zip
Only show similar artists for 5.1+
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/domain/Version.java2
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java3
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/domain/Version.java b/src/github/daneren2005/dsub/domain/Version.java
index f3566644..6b82ea99 100644
--- a/src/github/daneren2005/dsub/domain/Version.java
+++ b/src/github/daneren2005/dsub/domain/Version.java
@@ -88,6 +88,8 @@ public class Version implements Comparable<Version>, Serializable {
return "4.8";
case 10:
return "4.9";
+ case 11:
+ return "5.1";
}
}
return "";
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index fa9eea36..68857d41 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -210,6 +210,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
if(!ServerInfo.isMadsonic(context)) {
menu.removeItem(R.id.menu_top_tracks);
}
+ if(!ServerInfo.checkServerVersion(context, "1.11")) {
+ 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 53d797b5..084c0f52 100644
--- a/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -1381,6 +1381,8 @@ public class RESTMusicService implements MusicService {
@Override
public ArtistInfo getArtistInfo(String id, boolean refresh, Context context, ProgressListener progressListener) throws Exception {
+ checkServerVersion(context, "1.11", "Getting artist info is not supported");
+
Reader reader = getReader(context, progressListener, Util.isTagBrowsing(context, getInstance(context)) ? "getArtistInfo2" : "getArtistInfo", null, Arrays.asList("id"), Arrays.<Object>asList(id));
try {
return new ArtistInfoParser(context, getInstance(context)).parse(reader, progressListener);