[Android] TV: Filter video media from now playing audio card
Geoffrey Métais
git at videolan.org
Fri Oct 13 17:34:08 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 13 17:33:32 2017 +0200| [656373e526101ffd286ef31b5bc0d47b9be83eba] | committer: Geoffrey Métais
TV: Filter video media from now playing audio card
> https://code.videolan.org/videolan/vlc-android/commit/656373e526101ffd286ef31b5bc0d47b9be83eba
---
vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index 161514201..6eba48fd6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -556,10 +556,12 @@ public class MainTvActivity extends BaseTvActivity implements OnItemViewSelected
public void updateNowPlayingCard () {
if (mService == null)
return;
- if ((!mService.hasMedia() || mService.canSwitchToVideo()) && mNowPlayingCard != null) {
+ final boolean hasmedia = mService.hasMedia();
+ final boolean canSwitch = mService.canSwitchToVideo();
+ if ((!hasmedia || canSwitch) && mNowPlayingCard != null) {
mCategoriesAdapter.removeItems(0, 1);
mNowPlayingCard = null;
- } else if (mService.hasMedia()){
+ } else if (hasmedia && !canSwitch){
final MediaWrapper mw = mService.getCurrentMediaWrapper();
final String display = MediaUtils.getMediaTitle(mw) + " - " + MediaUtils.getMediaReferenceArtist(MainTvActivity.this, mw);
VLCApplication.runBackground(new Runnable() {
More information about the Android
mailing list