[Android] [PATCH] MediaWrapper: add TYPE_DIR

Thomas Guillem thomas at gllm.fr
Tue Jan 20 16:44:32 CET 2015


---
 vlc-android/src/org/videolan/vlc/MediaWrapper.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
index 93f161e..7d92424 100644
--- a/vlc-android/src/org/videolan/vlc/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
@@ -42,6 +42,7 @@ public class MediaWrapper implements Parcelable {
     public final static int TYPE_VIDEO = 0;
     public final static int TYPE_AUDIO = 1;
     public final static int TYPE_GROUP = 2;
+    public final static int TYPE_DIR = 3;
 
     protected String mTitle;
     private String mArtist;
@@ -129,6 +130,13 @@ public class MediaWrapper implements Parcelable {
                     mType = TYPE_AUDIO;
                 }
             }
+            if (mType == TYPE_ALL) {
+                /*
+                 * TODO: add something in libvlc to retrieve media type
+                 * In the meantime, assume media is a directory.
+                 */
+                mType = TYPE_DIR;
+            }
         }
         updateMeta(media);
     }
-- 
2.1.3



More information about the Android mailing list