[Android] Fix external devices uuid at startup
Geoffrey Métais
git at videolan.org
Thu Feb 2 16:26:48 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 2 16:03:33 2017 +0100| [0bfc68f5f80bf04c07961d2ae34d81e8cb59e545] | committer: Geoffrey Métais
Fix external devices uuid at startup
> https://code.videolan.org/videolan/vlc-android/commit/0bfc68f5f80bf04c07961d2ae34d81e8cb59e545
---
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 d02196d..249dbc0 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -19,6 +19,7 @@ import android.text.TextUtils;
import org.videolan.medialibrary.Medialibrary;
import org.videolan.medialibrary.interfaces.DevicesDiscoveryCb;
import org.videolan.vlc.util.AndroidDevices;
+import org.videolan.vlc.util.FileUtils;
import org.videolan.vlc.util.Strings;
import java.io.File;
@@ -110,7 +111,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
String[] storages = AndroidDevices.getMediaDirectories();
for (String storage : storages) {
boolean isMainStorage = TextUtils.equals(storage, AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY);
- mMedialibrary.addDevice(isMainStorage ? "main-storage" : storage, storage, !isMainStorage);
+ mMedialibrary.addDevice(isMainStorage ? "main-storage" : FileUtils.getFileNameFromPath(storage), storage, !isMainStorage);
}
if (mMedialibrary.init(VLCApplication.getAppContext())) {
showNotification();
More information about the Android
mailing list