[Android] If folders are already specified, don't add external storage

Sébastien Toque git at videolan.org
Sun Mar 12 08:04:06 CET 2017


vlc-android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Mar 12 08:02:19 2017 +0100| [b231b09e7ad99455d6e970b5f675a4fb1697827f] | committer: Sébastien Toque

If folders are already specified, don't add external storage

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

 vlc-android/src/org/videolan/vlc/MediaParsingService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 2ce2575..4fdcc47 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -132,7 +132,8 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
                             mMedialibrary.forceParserRetry();
                         }
                         for (String externalStorage : AndroidDevices.getExternalStorageDirectories()) {
-                            if (!TextUtils.equals(externalStorage, AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY)
+                            if (foldersList.length == 0
+                                    && !TextUtils.equals(externalStorage, AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY)
                                     && !Util.arrayContains(foldersList, "file://" + externalStorage + "/")) {
                                 for (String folder : Medialibrary.getBlackList())
                                     mMedialibrary.banFolder(externalStorage + folder);



More information about the Android mailing list