aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/res/menu/select_video_context.xml25
-rw-r--r--subsonic-android/res/menu/select_video_context_offline.xml25
-rw-r--r--subsonic-android/res/values/strings.xml1
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java15
4 files changed, 63 insertions, 3 deletions
diff --git a/subsonic-android/res/menu/select_video_context.xml b/subsonic-android/res/menu/select_video_context.xml
new file mode 100644
index 00000000..2edcb10a
--- /dev/null
+++ b/subsonic-android/res/menu/select_video_context.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/song_menu_webview"
+ android:title="@string/common.webview"
+ />
+
+ <item
+ android:id="@+id/song_menu_download"
+ android:title="@string/common.download"
+ />
+
+ <item
+ android:id="@+id/song_menu_pin"
+ android:title="@string/common.pin"
+ />
+
+ <item
+ android:id="@+id/song_menu_delete"
+ android:title="@string/common.delete"/>
+
+ <item
+ android:id="@+id/song_menu_star"
+ android:title="@string/common.star"/>
+</menu>
diff --git a/subsonic-android/res/menu/select_video_context_offline.xml b/subsonic-android/res/menu/select_video_context_offline.xml
new file mode 100644
index 00000000..2edcb10a
--- /dev/null
+++ b/subsonic-android/res/menu/select_video_context_offline.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/song_menu_webview"
+ android:title="@string/common.webview"
+ />
+
+ <item
+ android:id="@+id/song_menu_download"
+ android:title="@string/common.download"
+ />
+
+ <item
+ android:id="@+id/song_menu_pin"
+ android:title="@string/common.pin"
+ />
+
+ <item
+ android:id="@+id/song_menu_delete"
+ android:title="@string/common.delete"/>
+
+ <item
+ android:id="@+id/song_menu_star"
+ android:title="@string/common.star"/>
+</menu>
diff --git a/subsonic-android/res/values/strings.xml b/subsonic-android/res/values/strings.xml
index feb1bf9e..8a21950e 100644
--- a/subsonic-android/res/values/strings.xml
+++ b/subsonic-android/res/values/strings.xml
@@ -17,6 +17,7 @@
<string name="common.info">Details</string>
<string name="common.name">Name</string>
<string name="common.comment">Comment</string>
+ <string name="common.webview">Play Web View</string>
<string name="button_bar.home">Home</string>
<string name="button_bar.browse">Library</string>
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
index ccd5d5af..2d87c263 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
@@ -222,13 +222,19 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
inflater.inflate(R.menu.select_album_context_offline, menu);
else
inflater.inflate(R.menu.select_album_context, menu);
- } else {
+ } else if(!entry.isVideo()) {
MenuInflater inflater = getMenuInflater();
if(Util.isOffline(this))
inflater.inflate(R.menu.select_song_context_offline, menu);
else
inflater.inflate(R.menu.select_song_context, menu);
- }
+ } else {
+ MenuInflater inflater = getMenuInflater();
+ if(Util.isOffline(this))
+ inflater.inflate(R.menu.select_video_context_offline, menu);
+ else
+ inflater.inflate(R.menu.select_video_context, menu);
+ }
if (!Util.isOffline(this)) {
menu.findItem(entry.isDirectory() ? R.id.album_menu_star : R.id.song_menu_star).setTitle(entry.isStarred() ? R.string.common_unstar : R.string.common_star);
@@ -284,6 +290,9 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
case R.id.song_menu_star:
toggleStarred(entry);
break;
+ case R.id.song_menu_webview:
+ playVideo(entry);
+ break;
default:
return super.onContextItemSelected(menuItem);
}
@@ -486,7 +495,7 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
private void playVideo(MusicDirectory.Entry entry) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(MusicServiceFactory.getMusicService(this).getVideoUrl(this, entry.getId())));
-
+
startActivity(intent);
}