[Android] medialib: Update to API changes

Hugo Beauzée-Luyssen git at videolan.org
Wed Dec 4 11:04:10 CET 2019


vlc-android | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Dec  4 10:40:35 2019 +0100| [de4cbc7903a734f0829f9d5c8936ca7a0a0be8e8] | committer: Hugo Beauzée-Luyssen

medialib: Update to API changes

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

 medialibrary/jni/AndroidMediaLibrary.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/medialibrary/jni/AndroidMediaLibrary.cpp b/medialibrary/jni/AndroidMediaLibrary.cpp
index 68880c685..88895c901 100644
--- a/medialibrary/jni/AndroidMediaLibrary.cpp
+++ b/medialibrary/jni/AndroidMediaLibrary.cpp
@@ -310,7 +310,7 @@ AndroidMediaLibrary::searchGenre(const std::string& query, const medialibrary::Q
 medialibrary::Query<medialibrary::IArtist>
 AndroidMediaLibrary::searchArtists(const std::string& query, const medialibrary::QueryParameters* params)
 {
-    return p_ml->searchArtists(query, true, params);
+    return p_ml->searchArtists(query, medialibrary::ArtistIncluded::All, params);
 }
 
 medialibrary::MediaPtr
@@ -373,7 +373,8 @@ AndroidMediaLibrary::album(int64_t albumId)
 medialibrary::Query<medialibrary::IArtist>
 AndroidMediaLibrary::artists(bool includeAll, const medialibrary::QueryParameters* params)
 {
-    return p_ml->artists(includeAll, params);
+    return p_ml->artists(includeAll ? medialibrary::ArtistIncluded::All : medialibrary::ArtistIncluded::AlbumArtistOnly,
+                         params);
 }
 
 medialibrary::ArtistPtr
@@ -436,8 +437,10 @@ AndroidMediaLibrary::albumsFromArtist( int64_t artistId, const medialibrary::Que
 medialibrary::Query<medialibrary::IMedia>
 AndroidMediaLibrary::mediaFromGenre( int64_t genreId, bool withThumbnail, const medialibrary::QueryParameters* params )
 {
+    using medialibrary::IGenre;
     auto genre = p_ml->genre(genreId);
-    return genre == nullptr ? nullptr : genre->tracks(withThumbnail, params);
+    return genre == nullptr ? nullptr : genre->tracks(withThumbnail ? medialibrary::IGenre::TracksIncluded::WithThumbnailOnly : medialibrary::IGenre::TracksIncluded::All,
+                                                      params);
 }
 
 medialibrary::Query<medialibrary::IAlbum>



More information about the Android mailing list