aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-03-05 17:14:30 -0800
committerScott Jackson <daneren2005@gmail.com>2015-03-05 17:14:30 -0800
commit32354e91a9f2186d062b704fab7c6d7a40458d23 (patch)
treef5811a401058097e357b1a64f2b63cbaae6b7765 /src/github
parent63517523d48deeefe35864d8ac71c8d12f40e38a (diff)
downloaddsub-32354e91a9f2186d062b704fab7c6d7a40458d23.tar.gz
dsub-32354e91a9f2186d062b704fab7c6d7a40458d23.tar.bz2
dsub-32354e91a9f2186d062b704fab7c6d7a40458d23.zip
#462 Add albums by alphabetical
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/fragments/MainFragment.java6
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/fragments/MainFragment.java b/src/github/daneren2005/dsub/fragments/MainFragment.java
index 911fd757..ac29b274 100644
--- a/src/github/daneren2005/dsub/fragments/MainFragment.java
+++ b/src/github/daneren2005/dsub/fragments/MainFragment.java
@@ -163,6 +163,7 @@ public class MainFragment extends SubsonicFragment {
final View albumsStarredButton = buttons.findViewById(R.id.main_albums_starred);
final View albumsGenresButton = buttons.findViewById(R.id.main_albums_genres);
final View albumsYearButton = buttons.findViewById(R.id.main_albums_year);
+ final View albumsAlphabeticalButton = buttons.findViewById(R.id.main_albums_alphabetical);
final View dummyView = rootView.findViewById(R.id.main_dummy);
@@ -193,6 +194,9 @@ public class MainFragment extends SubsonicFragment {
if (!Util.isOffline(context)) {
adapter.addView(albumsTitle, false);
adapter.addViews(Arrays.asList(albumsNewestButton, albumsRandomButton), true);
+ if(ServerInfo.checkServerVersion(context, "1.8")) {
+ adapter.addView(albumsAlphabeticalButton, true);
+ }
if(!Util.isTagBrowsing(context)) {
adapter.addView(albumsHighestButton, true);
}
@@ -224,6 +228,8 @@ public class MainFragment extends SubsonicFragment {
showAlbumList("genres");
} else if(view == albumsYearButton) {
showAlbumList("years");
+ } else if(view == albumsAlphabeticalButton) {
+ showAlbumList("alphabeticalByName");
}
}
});
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 08ccac33..b83d2134 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -642,6 +642,8 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
setTitle(R.string.main_albums_starred);
} else if("genres".equals(albumListType) || "years".equals(albumListType)) {
setTitle(albumListExtra);
+ } else if("albumsAlphabeticalButton".equals(albumListType)) {
+ setTitle(R.string.main_albums_alphabetical);
}
new LoadTask(true) {