[Android] MediaWrapper: use Media.getType()

Thomas Guillem git at videolan.org
Wed Mar 25 16:43:47 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 12 16:33:03 2015 +0100| [862ab707e51da31762c54f600e4ab69fa2c0a9ef] | committer: Thomas Guillem

MediaWrapper: use Media.getType()

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

 vlc-android/src/org/videolan/vlc/MediaWrapper.java |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
index d6b8c29..76cc197 100644
--- a/vlc-android/src/org/videolan/vlc/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
@@ -124,6 +124,8 @@ public class MediaWrapper implements Parcelable {
                 }
             }
             updateMeta(media);
+            if (mType == TYPE_ALL && media.getType() == Media.Type.Directory)
+                mType = TYPE_DIR;
         }
 
         if (mType == TYPE_ALL) {
@@ -140,13 +142,6 @@ public class MediaWrapper implements Parcelable {
                     mType = TYPE_PLAYLIST;
                 }
             }
-            if (mType == TYPE_ALL) {
-                /*
-                 * TODO: add something in libvlc to retrieve media type
-                 * In the meantime, assume media is a directory.
-                 */
-                mType = TYPE_DIR;
-            }
         }
     }
 



More information about the Android mailing list