aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-12-03 21:35:05 -0800
committerScott Jackson <daneren2005@gmail.com>2013-12-03 21:35:05 -0800
commitfe0663b6cf0969c036d434a7b6ff2eff930e6b14 (patch)
tree685a7982f5c073e71937b2d65f50cc5d6206f31d
parente0425128ce3bcaba104ff10e471e64f058123792 (diff)
downloaddsub-fe0663b6cf0969c036d434a7b6ff2eff930e6b14.tar.gz
dsub-fe0663b6cf0969c036d434a7b6ff2eff930e6b14.tar.bz2
dsub-fe0663b6cf0969c036d434a7b6ff2eff930e6b14.zip
#161 Add menu to show all media
-rw-r--r--res/menu/select_album.xml4
-rw-r--r--res/values/strings.xml1
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java5
3 files changed, 9 insertions, 1 deletions
diff --git a/res/menu/select_album.xml b/res/menu/select_album.xml
index 469561f1..8dc004f1 100644
--- a/res/menu/select_album.xml
+++ b/res/menu/select_album.xml
@@ -18,4 +18,8 @@
android:icon="?attr/shuffle"
android:title="@string/menu.shuffle"
compat:showAsAction="ifRoom|withText"/>
+
+ <item
+ android:id="@+id/menu_show_all"
+ android:title="@string/menu.show_all"/>
</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a6de6759..a292840f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -77,6 +77,7 @@
<string name="menu.add_podcast">Add Channel</string>
<string name="menu.keep_synced">Keep Synced</string>
<string name="menu.stop_sync">Stop syncing</string>
+ <string name="menu.show_all">Show all media</string>
<string name="playlist.label">Playlists</string>
<string name="playlist.update_info">Update Information</string>
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 5b54305b..b5a7d9ad 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -131,7 +131,6 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
albumListExtra = args.getString(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_EXTRA);
albumListSize = args.getInt(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_SIZE, 0);
refreshListing = args.getBoolean(Constants.INTENT_EXTRA_REFRESH_LISTINGS);
- showAll = args.getBoolean(Constants.INTENT_EXTRA_VIEW_ALBUM, false);
if(entries == null) {
entries = (List<MusicDirectory.Entry>) args.getSerializable(Constants.FRAGMENT_LIST);
}
@@ -228,6 +227,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
case R.id.menu_download_all:
downloadAllPodcastEpisodes();
return true;
+ case R.id.menu_show_all:
+ showAll = true;
+ refresh(true);
}
if(super.onOptionsItemSelected(item)) {
@@ -395,6 +397,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
List<MusicDirectory.Entry> songs = new ArrayList<MusicDirectory.Entry>();
getSongsRecursively(root, songs);
root.replaceChildren(songs);
+ return root;
}
private void getSongsRecursively(MusicDirectory parent, List<MusicDirectory.Entry> songs) throws Exception {