[Android] Medialibrary: Update API

Geoffrey Métais git at videolan.org
Mon Oct 14 15:09:06 CEST 2019


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 14 15:08:22 2019 +0200| [dfff5c7658cb22eaf7f7eb12fb84b1d0b6b44d4f] | committer: Geoffrey Métais

Medialibrary: Update API

(cherry picked from commit eec68abbab5ab467a044bfa2836682a69bb704b8)

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

 medialibrary/jni/medialibrary.cpp | 5 +++--
 medialibrary/jni/utils.cpp        | 2 +-
 medialibrary/jni/utils.h          | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/medialibrary/jni/medialibrary.cpp b/medialibrary/jni/medialibrary.cpp
index 091d2f09a..8c4ec094c 100644
--- a/medialibrary/jni/medialibrary.cpp
+++ b/medialibrary/jni/medialibrary.cpp
@@ -10,6 +10,7 @@
 #include "log.h"
 #include "utils.h"
 #include "AndroidMediaLibrary.h"
+#include <medialibrary/filesystem/Errors.h>
 
 static JavaVM *myVm;
 static fields ml_fields;
@@ -1749,7 +1750,7 @@ folders(JNIEnv* env, jobject thiz, jint type, jint sortingCriteria, jboolean des
             env->SetObjectArrayElement(foldersRefs, ++index, item);
             env->DeleteLocalRef(item);
         }
-        catch( const medialibrary::fs::DeviceRemovedException& )
+        catch( const medialibrary::fs::errors::DeviceRemoved& )
         {
             // Ignore this folder since it's on a removed device.
         }
@@ -1793,7 +1794,7 @@ videoGroups(JNIEnv* env, jobject thiz, jint sortingCriteria, jboolean desc, jint
             env->SetObjectArrayElement(groupsRefs, ++index, item);
             env->DeleteLocalRef(item);
         }
-        catch( const medialibrary::fs::DeviceRemovedException& )
+        catch( const medialibrary::fs::errors::DeviceRemoved& )
         {
             // Ignore this VideoGroup since it's on a removed device.
         }
diff --git a/medialibrary/jni/utils.cpp b/medialibrary/jni/utils.cpp
index 014b72954..fe691777d 100644
--- a/medialibrary/jni/utils.cpp
+++ b/medialibrary/jni/utils.cpp
@@ -53,7 +53,7 @@ mediaToMediaWrapper(JNIEnv* env, fields *fields, medialibrary::MediaPtr const& m
     filename = mediaPtr->fileName().empty() ? NULL : env->NewStringUTF(mediaPtr->fileName().c_str());
     try {
         mrl = env->NewStringUTF(files.at(0)->mrl().c_str());
-    } catch(const medialibrary::fs::DeviceRemovedException&) {
+    } catch(const medialibrary::fs::errors::DeviceRemoved&) {
         return nullptr;
     }
     thumbnail = mediaPtr->thumbnailMrl(medialibrary::ThumbnailSizeType::Thumbnail).empty() ? NULL : env->NewStringUTF(mediaPtr->thumbnailMrl(medialibrary::ThumbnailSizeType::Thumbnail).c_str());
diff --git a/medialibrary/jni/utils.h b/medialibrary/jni/utils.h
index d20a3b705..9ec3ae8d4 100644
--- a/medialibrary/jni/utils.h
+++ b/medialibrary/jni/utils.h
@@ -36,6 +36,7 @@
 #include <medialibrary/IMetadata.h>
 #include<medialibrary/filesystem/IDevice.h>
 #include <medialibrary/IVideoGroup.h>
+#include <medialibrary/filesystem/Errors.h>
 
 #define VLC_JNI_VERSION JNI_VERSION_1_2
 



More information about the Android mailing list