[Android] Improve the playlist conversion from the ML

Nicolas Pomepuy git at videolan.org
Tue Mar 14 11:59:20 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Mar  9 12:58:15 2023 +0100| [2c6d4b76aba9aa66d0749a1a64d2b9da8d224cdc] | committer: Nicolas Pomepuy

Improve the playlist conversion from the ML

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

 medialibrary/jni/utils.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/medialibrary/jni/utils.cpp b/medialibrary/jni/utils.cpp
index eaaef924a2..06827d63dc 100644
--- a/medialibrary/jni/utils.cpp
+++ b/medialibrary/jni/utils.cpp
@@ -121,15 +121,8 @@ utils::jni::object
 convertPlaylistObject(JNIEnv* env, fields *fields, medialibrary::PlaylistPtr const& playlistPtr, jboolean includeMissing, jboolean onlyFavorites)
 {
     auto name = vlcNewStringUTF(env, playlistPtr->name().c_str());
-     medialibrary::QueryParameters params {
-           medialibrary::SortingCriteria::Default,
-           false,
-           static_cast<bool>( includeMissing ),
-           false,
-           false
-        };
     return utils::jni::object{ env, env->NewObject(fields->Playlist.clazz, fields->Playlist.initID,
-                          (jlong) playlistPtr->id(), name.get(), (jint)playlistPtr->media(&params)->count(), (jlong)playlistPtr->duration(), (jint)playlistPtr->nbVideo(), (jint)playlistPtr->nbAudio(), (jint)playlistPtr->nbUnknown(), (jint)playlistPtr->nbDurationUnknown(), (jboolean)playlistPtr->isFavorite())
+                          (jlong) playlistPtr->id(), name.get(), (jint)playlistPtr->nbMedia(), (jlong)playlistPtr->duration(), (jint)playlistPtr->nbVideo(), (jint)playlistPtr->nbAudio(), (jint)playlistPtr->nbUnknown(), (jint)playlistPtr->nbDurationUnknown(), (jboolean)playlistPtr->isFavorite())
     };
 }
 



More information about the Android mailing list