diff options
-rw-r--r-- | res/menu/select_album.xml | 4 | ||||
-rw-r--r-- | res/values/strings.xml | 1 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 5 |
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 {
|