diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java | 14 | ||||
-rw-r--r-- | app/src/main/res/menu/select_podcast_episode_video_context.xml | 48 |
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> |