aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-11-14 12:26:40 -0800
committerScott Jackson <daneren2005@gmail.com>2015-11-14 12:26:40 -0800
commitafd7424305448076b6784d14340b2c9dc72a2644 (patch)
treef57184db0fb252d19636ef5653f842bcb2fe7ad7 /app
parentdd48999aa8acdcf65dcf94f190885a2df2f83ea4 (diff)
downloaddsub-afd7424305448076b6784d14340b2c9dc72a2644.tar.gz
dsub-afd7424305448076b6784d14340b2c9dc72a2644.tar.bz2
dsub-afd7424305448076b6784d14340b2c9dc72a2644.zip
Add menu for video podcasts for podcast specific functions
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java14
-rw-r--r--app/src/main/res/menu/select_podcast_episode_video_context.xml48
2 files changed, 59 insertions, 3 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 2b95af22..33ce0b20 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -228,12 +228,20 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
public void onCreateContextMenuSupport(Menu menu, MenuInflater menuInflater, UpdateView updateView, Object selected) {
if(selected instanceof Entry) {
Entry entry = (Entry) selected;
- if(entry instanceof PodcastEpisode && !entry.isVideo()) {
+ if(entry instanceof PodcastEpisode) {
if(Util.isOffline(context)) {
- menuInflater.inflate(R.menu.select_podcast_episode_context_offline, menu);
+ if(entry.isVideo()) {
+ menuInflater.inflate(R.menu.select_video_context_offline, menu);
+ } else {
+ menuInflater.inflate(R.menu.select_podcast_episode_context_offline, menu);
+ }
}
else {
- menuInflater.inflate(R.menu.select_podcast_episode_context, menu);
+ if(entry.isVideo()) {
+ menuInflater.inflate(R.menu.select_podcast_episode_video_context, menu);
+ } else {
+ menuInflater.inflate(R.menu.select_podcast_episode_context, menu);
+ }
if(entry.getBookmark() == null) {
menu.removeItem(R.id.bookmark_menu_delete);
diff --git a/app/src/main/res/menu/select_podcast_episode_video_context.xml b/app/src/main/res/menu/select_podcast_episode_video_context.xml
new file mode 100644
index 00000000..5b06cde7
--- /dev/null
+++ b/app/src/main/res/menu/select_podcast_episode_video_context.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:compat="http://schemas.android.com/apk/res-auto">
+
+ <item
+ android:id="@+id/song_menu_info"
+ android:title="@string/common.info"/>
+
+ <item
+ android:id="@+id/song_menu_stream_external"
+ android:title="@string/common.stream_external"/>
+
+ <item
+ android:id="@+id/song_menu_play_external"
+ android:title="@string/common.play_external"/>
+
+ <group android:id="@+id/hide_download">
+ <item
+ android:id="@+id/song_menu_download"
+ android:title="@string/common.download"/>
+ </group>
+
+ <group android:id="@+id/hide_pin">
+ <item
+ android:id="@+id/song_menu_pin"
+ android:title="@string/common.pin"/>
+ </group>
+
+ <group android:id="@+id/hide_delete">
+ <item
+ android:id="@+id/song_menu_delete"
+ android:title="@string/menu.delete_cache"/>
+ </group>
+
+ <group android:id="@+id/server_1.9">
+ <item
+ android:id="@+id/bookmark_menu_delete"
+ android:title="@string/bookmark.delete"/>
+ </group>
+
+ <item
+ android:id="@+id/song_menu_server_download"
+ android:title="@string/select_podcasts.server_download"/>
+
+ <item
+ android:id="@+id/song_menu_server_delete"
+ android:title="@string/select_podcasts.server_delete"/>
+</menu>