From e1cff0bc2260e0ca9b5f2d51a57df43985cee069 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 23 Apr 2015 17:53:13 -0700 Subject: Don't show Per Folder option for Madsonic --- src/github/daneren2005/dsub/domain/ServerInfo.java | 4 ++++ src/github/daneren2005/dsub/fragments/MainFragment.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/github/daneren2005') 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 -- cgit v1.2.3