[Android] Fix video groups playback from action mode

Geoffrey Métais git at videolan.org
Tue Oct 9 17:59:14 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Oct  9 16:16:47 2018 +0200| [16daccc112d0a2d8e7038c3876aa47cc43f2f1d4] | committer: Geoffrey Métais

Fix video groups playback from action mode

> https://code.videolan.org/videolan/vlc-android/commit/16daccc112d0a2d8e7038c3876aa47cc43f2f1d4
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 105ae2478..819cd8b7e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -261,7 +261,12 @@ public class VideoGridFragment extends MediaBrowserFragment<VideosModel> impleme
         if (!list.isEmpty()) {
             switch (item.getItemId()) {
                 case R.id.action_video_play:
-                    MediaUtils.INSTANCE.openList(getActivity(), list, 0);
+                    final List<MediaWrapper> videos = new ArrayList();
+                    for (MediaWrapper mw : list) {
+                        if (mw.getType() == MediaWrapper.TYPE_GROUP) videos.addAll(((MediaGroup)mw).getAll());
+                        else videos.add(mw);
+                    }
+                    MediaUtils.INSTANCE.openList(getActivity(), videos, 0);
                     break;
                 case R.id.action_video_append:
                     MediaUtils.INSTANCE.appendMedia(getActivity(), list);



More information about the Android mailing list