aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-11-29 12:58:48 -0800
committerScott Jackson <daneren2005@gmail.com>2013-11-29 12:58:48 -0800
commit14542ac3d39435011384cef3ffd5c61fa8af8c34 (patch)
tree3de3a885e9749af1578eb162498331ae20cdeae6
parent2430bf529f1209bbe5144658cee1b9e136311215 (diff)
downloaddsub-14542ac3d39435011384cef3ffd5c61fa8af8c34.tar.gz
dsub-14542ac3d39435011384cef3ffd5c61fa8af8c34.tar.bz2
dsub-14542ac3d39435011384cef3ffd5c61fa8af8c34.zip
Added play next to other menus
-rw-r--r--res/menu/select_album_context.xml4
-rw-r--r--res/menu/select_album_context_offline.xml4
-rw-r--r--res/menu/select_artist_context.xml4
-rw-r--r--res/menu/select_artist_context_offline.xml4
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java14
5 files changed, 29 insertions, 1 deletions
diff --git a/res/menu/select_album_context.xml b/res/menu/select_album_context.xml
index efc2f2fd..21f5cab9 100644
--- a/res/menu/select_album_context.xml
+++ b/res/menu/select_album_context.xml
@@ -12,6 +12,10 @@
android:title="@string/common.play_shuffled"
/>
+ <item
+ android:id="@+id/album_menu_play_next"
+ android:title="@string/common.play_next"/>
+
<item
android:id="@+id/album_menu_play_last"
android:title="@string/common.play_last"
diff --git a/res/menu/select_album_context_offline.xml b/res/menu/select_album_context_offline.xml
index d40466fd..c0fa32de 100644
--- a/res/menu/select_album_context_offline.xml
+++ b/res/menu/select_album_context_offline.xml
@@ -11,6 +11,10 @@
android:title="@string/common.play_shuffled"
/>
+ <item
+ android:id="@+id/album_menu_play_next"
+ android:title="@string/common.play_next"/>
+
<item
android:id="@+id/album_menu_play_last"
android:title="@string/common.play_last"
diff --git a/res/menu/select_artist_context.xml b/res/menu/select_artist_context.xml
index e35cae9e..e2a401a0 100644
--- a/res/menu/select_artist_context.xml
+++ b/res/menu/select_artist_context.xml
@@ -12,6 +12,10 @@
android:title="@string/common.play_shuffled"
/>
+ <item
+ android:id="@+id/artist_menu_play_next"
+ android:title="@string/common.play_next"/>
+
<item
android:id="@+id/artist_menu_play_last"
android:title="@string/common.play_last"
diff --git a/res/menu/select_artist_context_offline.xml b/res/menu/select_artist_context_offline.xml
index 72d99cd5..b48471be 100644
--- a/res/menu/select_artist_context_offline.xml
+++ b/res/menu/select_artist_context_offline.xml
@@ -12,6 +12,10 @@
android:title="@string/common.play_shuffled"
/>
+ <item
+ android:id="@+id/artist_menu_play_next"
+ android:title="@string/common.play_next"/>
+
<item
android:id="@+id/artist_menu_play_last"
android:title="@string/common.play_last"
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index bec0be05..d8de9982 100644
--- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -216,6 +216,9 @@ public class SubsonicFragment extends Fragment {
case R.id.artist_menu_play_shuffled:
downloadRecursively(artist.getId(), false, false, true, true, false);
break;
+ case R.id.artist_menu_play_next:
+ downloadRecursively(artist.getId(), false, true, false, false, false, true);
+ break;
case R.id.artist_menu_play_last:
downloadRecursively(artist.getId(), false, true, false, false, false);
break;
@@ -237,6 +240,9 @@ public class SubsonicFragment extends Fragment {
case R.id.album_menu_play_shuffled:
downloadRecursively(entry.getId(), false, false, true, true, false);
break;
+ case R.id.album_menu_play_next:
+ downloadRecursively(entry.getId(), false, true, false, false, false, true);
+ break;
case R.id.album_menu_play_last:
downloadRecursively(entry.getId(), false, true, false, false, false);
break;
@@ -607,10 +613,16 @@ public class SubsonicFragment extends Fragment {
protected void downloadRecursively(final String id, final boolean save, final boolean append, final boolean autoplay, final boolean shuffle, final boolean background) {
downloadRecursively(id, "", true, save, append, autoplay, shuffle, background);
}
+ protected void downloadRecursively(final String id, final boolean save, final boolean append, final boolean autoplay, final boolean shuffle, final boolean background, final boolean playNext) {
+ downloadRecursively(id, "", true, save, append, autoplay, shuffle, background, playNext);
+ }
protected void downloadPlaylist(final String id, final String name, final boolean save, final boolean append, final boolean autoplay, final boolean shuffle, final boolean background) {
downloadRecursively(id, name, false, save, append, autoplay, shuffle, background);
}
protected void downloadRecursively(final String id, final String name, final boolean isDirectory, final boolean save, final boolean append, final boolean autoplay, final boolean shuffle, final boolean background) {
+ downloadRecursively(id, name, isDirectory, save, append, autoplay, shuffle, background, false);
+ }
+ protected void downloadRecursively(final String id, final String name, final boolean isDirectory, final boolean save, final boolean append, final boolean autoplay, final boolean shuffle, final boolean background, final boolean playNext) {
LoadingTask<List<MusicDirectory.Entry>> task = new LoadingTask<List<MusicDirectory.Entry>>(context) {
private static final int MAX_SONGS = 500;
@@ -652,7 +664,7 @@ public class SubsonicFragment extends Fragment {
}
warnIfNetworkOrStorageUnavailable();
if(!background) {
- downloadService.download(songs, save, autoplay, false, shuffle);
+ downloadService.download(songs, save, autoplay, playNext, shuffle);
if(!append) {
Util.startActivityWithoutTransition(context, DownloadActivity.class);
}