aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-04-23 17:53:13 -0700
committerScott Jackson <daneren2005@gmail.com>2015-04-23 17:53:13 -0700
commite1cff0bc2260e0ca9b5f2d51a57df43985cee069 (patch)
tree6b0cdd2280c5411fd4e1f7787d454aa70ca55d92 /src/github/daneren2005
parent563549a812c08f78e422b2bf7113a22029adb9e6 (diff)
downloaddsub-e1cff0bc2260e0ca9b5f2d51a57df43985cee069.tar.gz
dsub-e1cff0bc2260e0ca9b5f2d51a57df43985cee069.tar.bz2
dsub-e1cff0bc2260e0ca9b5f2d51a57df43985cee069.zip
Don't show Per Folder option for Madsonic
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/domain/ServerInfo.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/MainFragment.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/domain/ServerInfo.java b/src/github/daneren2005/dsub/domain/ServerInfo.java
index 2394a233..3ece6af9 100644
--- a/src/github/daneren2005/dsub/domain/ServerInfo.java
+++ b/src/github/daneren2005/dsub/domain/ServerInfo.java
@@ -206,4 +206,8 @@ public class ServerInfo implements Serializable {
public static boolean canSavePlayQueue(Context context) {
return ServerInfo.checkServerVersion(context, "1.12") && !ServerInfo.isMadsonic(context);
}
+
+ public static boolean canAlbumListPerFolder(Context context) {
+ return ServerInfo.checkServerVersion(context, "1.11") && !ServerInfo.isMadsonic(context);
+ }
}
diff --git a/src/github/daneren2005/dsub/fragments/MainFragment.java b/src/github/daneren2005/dsub/fragments/MainFragment.java
index ebe84d77..ce488aff 100644
--- a/src/github/daneren2005/dsub/fragments/MainFragment.java
+++ b/src/github/daneren2005/dsub/fragments/MainFragment.java
@@ -174,7 +174,7 @@ public class MainFragment extends SubsonicFragment {
final View dummyView = rootView.findViewById(R.id.main_dummy);
final CheckBox albumsPerFolderCheckbox = (CheckBox) buttons.findViewById(R.id.main_albums_per_folder);
- if(!Util.isOffline(context) && ServerInfo.checkServerVersion(context, "1.11")) {
+ if(!Util.isOffline(context) && ServerInfo.canAlbumListPerFolder(context)) {
albumsPerFolderCheckbox.setChecked(Util.getAlbumListsPerFolder(context));
albumsPerFolderCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override