[Android] medialibrary: Add a folder accessor

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 6 14:38:03 UTC 2022


vlc-android | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Nov 29 10:32:05 2021 +0100| [3096e52bbb1f7eb2b130f8e95b0d92109cc40ca6] | committer: Nicolas Pomepuy

medialibrary: Add a folder accessor

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

 medialibrary/jni/AndroidMediaLibrary.cpp | 5 +++++
 medialibrary/jni/AndroidMediaLibrary.h   | 1 +
 2 files changed, 6 insertions(+)

diff --git a/medialibrary/jni/AndroidMediaLibrary.cpp b/medialibrary/jni/AndroidMediaLibrary.cpp
index 708859239..9141cedc0 100644
--- a/medialibrary/jni/AndroidMediaLibrary.cpp
+++ b/medialibrary/jni/AndroidMediaLibrary.cpp
@@ -556,6 +556,11 @@ medialibrary::Query<medialibrary::IFolder> AndroidMediaLibrary::subFolders(int64
     return folder != nullptr ? folder->subfolders(params) : nullptr;
 }
 
+medialibrary::FolderPtr AndroidMediaLibrary::folder(int64_t folderId)
+{
+    return p_ml->folder(folderId);
+}
+
 medialibrary::Query<medialibrary::IMediaGroup>
 AndroidMediaLibrary::videoGroups( const medialibrary::QueryParameters* params )
 {
diff --git a/medialibrary/jni/AndroidMediaLibrary.h b/medialibrary/jni/AndroidMediaLibrary.h
index 429ffc712..79a10f3c9 100644
--- a/medialibrary/jni/AndroidMediaLibrary.h
+++ b/medialibrary/jni/AndroidMediaLibrary.h
@@ -110,6 +110,7 @@ public:
     medialibrary::Query<medialibrary::IMedia> mediaFromFolder(int64_t folderId, medialibrary::IMedia::Type type, const medialibrary::QueryParameters* params = nullptr );
     medialibrary::Query<medialibrary::IFolder> folders(const medialibrary::QueryParameters* params = nullptr, medialibrary::IMedia::Type type = medialibrary::IMedia::Type::Unknown );
     medialibrary::Query<medialibrary::IFolder> subFolders(int64_t folderId, const medialibrary::QueryParameters* params = nullptr );
+    medialibrary::FolderPtr folder(int64_t folderId);
     // VideoGroups
     medialibrary::Query<medialibrary::IMedia> mediaFromMediaGroup(const int64_t groupId, const medialibrary::QueryParameters* params );
     medialibrary::Query<medialibrary::IMedia> searchFromMediaGroup(const int64_t groupId, const std::string& query, const medialibrary::QueryParameters* params );



More information about the Android mailing list