[Android] Discover internal storage only on first launch
Geoffrey Métais
git at videolan.org
Wed Apr 19 17:32:13 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 19 17:04:28 2017 +0200| [b99b4ff1be4b6a669ca6a14192586a922890f49f] | committer: Geoffrey Métais
Discover internal storage only on first launch
Next times, medialibrary will be reloaded
> https://code.videolan.org/videolan/vlc-android/commit/b99b4ff1be4b6a669ca6a14192586a922890f49f
---
vlc-android/src/org/videolan/vlc/MediaParsingService.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 9e2e313..753cbb2 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -194,7 +194,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
if (isMainStorage) {
if (shouldInit) {
for (String folder : Medialibrary.getBlackList())
- mMedialibrary.banFolder(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + folder);
+ mMedialibrary.banFolder(device + folder);
}
} else if (isNew) {
startActivity(new Intent(MediaParsingService.this, DialogActivity.class)
@@ -205,10 +205,10 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
}
mMedialibrary.start();
- for (String storage : AndroidDevices.getMediaDirectories())
- mMedialibrary.discover(storage);
LocalBroadcastManager.getInstance(MediaParsingService.this).sendBroadcast(new Intent(VLCApplication.ACTION_MEDIALIBRARY_READY));
- if (!shouldInit && upgrade)
+ if (shouldInit)
+ mMedialibrary.discover(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY);
+ else if (upgrade)
mMedialibrary.forceParserRetry();
}
initOngoing = false;
More information about the Android
mailing list