aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorowner <owner@DeeDee-Laptop>2012-12-31 19:39:20 -0800
committerowner <owner@DeeDee-Laptop>2012-12-31 19:39:20 -0800
commit45edaca05fef424e2d049ee32d7f1c536df2c866 (patch)
treeda04518d29fe5b0c9ed20ea0618cd6860ca008c5 /subsonic-android/src/github
parent71f5540de691b9d69c8fea658e75e25664ca0e23 (diff)
downloaddsub-45edaca05fef424e2d049ee32d7f1c536df2c866.tar.gz
dsub-45edaca05fef424e2d049ee32d7f1c536df2c866.tar.bz2
dsub-45edaca05fef424e2d049ee32d7f1c536df2c866.zip
Fixes crash when no external video player is installed
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
index de92d244..78db07f5 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
@@ -556,7 +556,14 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
} else {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(entry.getPath()), "video/*");
- startActivity(intent);
+
+ List<ResolveInfo> intents = getPackageManager()
+ .queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
+ if(intents != null && intents.size() > 0) {
+ startActivity(intent);
+ }else {
+ Util.toast(this, R.string.download_no_streaming_player);
+ }
}
}
private void streamExternalPlayer(MusicDirectory.Entry entry) {