[Android] TV: Fix media opening
Geoffrey Métais
git at videolan.org
Wed Apr 4 18:36:20 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 3 18:52:02 2018 +0200| [a45f4702aa306fe3f016fdf78e5febbfb5680b2e] | committer: Geoffrey Métais
TV: Fix media opening
> https://code.videolan.org/videolan/vlc-android/commit/a45f4702aa306fe3f016fdf78e5febbfb5680b2e
---
vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.kt | 2 +-
.../src/org/videolan/vlc/gui/tv/browser/MediaLibBrowserFragment.kt | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.kt b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.kt
index dfb0de4d3..8aa2d0960 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.kt
@@ -120,7 +120,7 @@ object TvUtil {
fun openMedia(activity: Activity, item: Any?, row: Row?) {
if (item is MediaWrapper) {
when {
- item.type == MediaWrapper.TYPE_AUDIO -> showMediaDetail(activity, item)
+ item.type == MediaWrapper.TYPE_AUDIO -> openAudioCategory(activity, item)
item.type == MediaWrapper.TYPE_DIR -> {
Log.d(TAG, "openMedia: " + item.uri)
val intent = Intent(activity, VerticalGridActivity::class.java)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/browser/MediaLibBrowserFragment.kt b/vlc-android/src/org/videolan/vlc/gui/tv/browser/MediaLibBrowserFragment.kt
index 8d49d1c20..c2acfdfbd 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/browser/MediaLibBrowserFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/browser/MediaLibBrowserFragment.kt
@@ -34,7 +34,6 @@ import android.support.v17.leanback.app.BackgroundManager
import android.support.v17.leanback.widget.*
import org.videolan.medialibrary.media.MediaLibraryItem
import org.videolan.vlc.gui.tv.TvUtil
-import org.videolan.vlc.media.MediaGroup
import org.videolan.vlc.util.Constants
import org.videolan.vlc.util.RefreshModel
@@ -94,7 +93,6 @@ abstract class MediaLibBrowserFragment<T : RefreshModel> : GridFragment(), OnIte
// }
// TvUtil.playAudioList(mContext, mDataList as Array<MediaWrapper>, position)
// } else
- if (item is MediaGroup) TvUtil.openMedia(mContext, item, row)
- else TvUtil.openAudioCategory(mContext, item as MediaLibraryItem)
+ TvUtil.openMedia(mContext, item, row)
}
}
More information about the Android
mailing list