[Android] MediaWrapper: add TYPE_DIR

Thomas Guillem git at videolan.org
Tue Jan 20 17:20:33 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jan 20 16:42:46 2015 +0100| [5517f2e6862a3326e752774fb4b8a5dde3d3c6a3] | committer: Thomas Guillem

MediaWrapper: add TYPE_DIR

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=5517f2e6862a3326e752774fb4b8a5dde3d3c6a3
---

 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);
     }



More information about the Android mailing list