aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java14
-rw-r--r--app/src/main/res/menu/select_artist_context.xml14
-rw-r--r--app/src/main/res/menu/select_artist_context_offline.xml16
-rw-r--r--app/src/main/res/menu/select_bookmark_context.xml6
-rw-r--r--app/src/main/res/menu/select_podcast_episode_context.xml6
-rw-r--r--app/src/main/res/menu/select_podcast_episode_context_offline.xml6
-rw-r--r--app/src/main/res/menu/select_song_context.xml6
-rw-r--r--app/src/main/res/menu/select_song_context_offline.xml6
8 files changed, 73 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
index d1eab8b7..e7d44e6d 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -271,7 +271,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
} else if(selected instanceof Artist) {
Artist artist = (Artist) selected;
if(Util.isOffline(context)) {
- // menuInflater.inflate(R.menu.select_artist_context_offline, menu);
+ menuInflater.inflate(R.menu.select_artist_context_offline, menu);
} else {
menuInflater.inflate(R.menu.select_artist_context, menu);
@@ -304,6 +304,15 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
songs.add(entry);
switch (menuItem.getItemId()) {
+ case R.id.artist_menu_play_now:
+ downloadRecursively(artist.getId(), false, false, true, false, false);
+ break;
+ case R.id.artist_menu_play_shuffled:
+ downloadRecursively(artist.getId(), false, false, true, true, false);
+ break;
+ case R.id.artist_menu_play_last:
+ downloadRecursively(artist.getId(), false, true, false, false, false);
+ break;
case R.id.artist_menu_star:
toggleStarred(artist);
break;
@@ -319,6 +328,9 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
case R.id.album_menu_share:
createShare(songs);
break;
+ case R.id.song_menu_play_last:
+ getDownloadService().download(songs, false, false, false, false);
+ break;
case R.id.song_menu_download:
getDownloadService().downloadBackground(songs, false);
break;
diff --git a/app/src/main/res/menu/select_artist_context.xml b/app/src/main/res/menu/select_artist_context.xml
index b8bce32d..40f912db 100644
--- a/app/src/main/res/menu/select_artist_context.xml
+++ b/app/src/main/res/menu/select_artist_context.xml
@@ -1,6 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:id="@+id/server_1_10">
+ <item
+ android:id="@+id/artist_menu_play_now"
+ android:title="@string/common.play_now"/>
+
+ <item
+ android:id="@+id/artist_menu_play_shuffled"
+ android:title="@string/common.play_shuffled"/>
+
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/artist_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
+
<group android:id="@+id/hide_star">
<item
android:id="@+id/artist_menu_star"
diff --git a/app/src/main/res/menu/select_artist_context_offline.xml b/app/src/main/res/menu/select_artist_context_offline.xml
new file mode 100644
index 00000000..2dc78ab8
--- /dev/null
+++ b/app/src/main/res/menu/select_artist_context_offline.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/artist_menu_play_now"
+ android:title="@string/common.play_now"/>
+
+ <item
+ android:id="@+id/artist_menu_play_shuffled"
+ android:title="@string/common.play_shuffled"/>
+
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/artist_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
+</menu> \ No newline at end of file
diff --git a/app/src/main/res/menu/select_bookmark_context.xml b/app/src/main/res/menu/select_bookmark_context.xml
index d52db105..aaa3e3e8 100644
--- a/app/src/main/res/menu/select_bookmark_context.xml
+++ b/app/src/main/res/menu/select_bookmark_context.xml
@@ -6,6 +6,12 @@
android:id="@+id/bookmark_menu_info"
android:title="@string/common.info"/>
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/song_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
+
<item
android:id="@+id/song_menu_show_album"
android:title="@string/download.menu_show_album"/>
diff --git a/app/src/main/res/menu/select_podcast_episode_context.xml b/app/src/main/res/menu/select_podcast_episode_context.xml
index f6399afb..d535cc7e 100644
--- a/app/src/main/res/menu/select_podcast_episode_context.xml
+++ b/app/src/main/res/menu/select_podcast_episode_context.xml
@@ -7,6 +7,12 @@
android:title="@string/common.info"
/>
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/song_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
+
<group android:id="@+id/server_1.9">
<item
android:id="@+id/bookmark_menu_delete"
diff --git a/app/src/main/res/menu/select_podcast_episode_context_offline.xml b/app/src/main/res/menu/select_podcast_episode_context_offline.xml
index a6d691d4..a34d7f08 100644
--- a/app/src/main/res/menu/select_podcast_episode_context_offline.xml
+++ b/app/src/main/res/menu/select_podcast_episode_context_offline.xml
@@ -6,4 +6,10 @@
android:id="@+id/song_menu_info"
android:title="@string/common.info"
/>
+
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/song_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
</menu>
diff --git a/app/src/main/res/menu/select_song_context.xml b/app/src/main/res/menu/select_song_context.xml
index eae8a8bc..b1e3c979 100644
--- a/app/src/main/res/menu/select_song_context.xml
+++ b/app/src/main/res/menu/select_song_context.xml
@@ -6,6 +6,12 @@
android:id="@+id/song_menu_info"
android:title="@string/common.info"
/>
+
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/song_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
<group android:id="@+id/server_1.8">
<item
diff --git a/app/src/main/res/menu/select_song_context_offline.xml b/app/src/main/res/menu/select_song_context_offline.xml
index 77903fb0..1e697f30 100644
--- a/app/src/main/res/menu/select_song_context_offline.xml
+++ b/app/src/main/res/menu/select_song_context_offline.xml
@@ -7,6 +7,12 @@
android:title="@string/common.info"
/>
+ <group android:id="@+id/hide_play_last">
+ <item
+ android:id="@+id/song_menu_play_last"
+ android:title="@string/common.play_last"/>
+ </group>
+
<item
android:id="@+id/song_menu_star"
android:title="@string/common.star"/>