[Android] ML: update history api calls

Duncan McNamara git at videolan.org
Wed Jan 24 13:35:27 UTC 2024


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Thu Dec 14 17:03:41 2023 +0100| [8dca039f3760f3bb3e8baa61d35cb2558841bfbc] | committer: Duncan McNamara

ML: update history api calls

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

 buildsystem/compile-medialibrary.sh      | 2 +-
 medialibrary/jni/AndroidMediaLibrary.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/buildsystem/compile-medialibrary.sh b/buildsystem/compile-medialibrary.sh
index 6f0c42fc6e..b20b6677cd 100755
--- a/buildsystem/compile-medialibrary.sh
+++ b/buildsystem/compile-medialibrary.sh
@@ -6,7 +6,7 @@ set -e
 # ARGUMENTS #
 #############
 
-MEDIALIBRARY_HASH=918b0e7ff962aa31fe8502ae9bd7d2fd389c6ff6
+MEDIALIBRARY_HASH=11176ab043af17af6130a083523d2d282a1eb1d7
 
 while [ $# -gt 0 ]; do
   case $1 in
diff --git a/medialibrary/jni/AndroidMediaLibrary.cpp b/medialibrary/jni/AndroidMediaLibrary.cpp
index b7d6dff513..01b7dae33b 100644
--- a/medialibrary/jni/AndroidMediaLibrary.cpp
+++ b/medialibrary/jni/AndroidMediaLibrary.cpp
@@ -210,7 +210,7 @@ AndroidMediaLibrary::removeMediaFromHistory(int64_t mediaId)
 std::vector<medialibrary::MediaPtr>
 AndroidMediaLibrary::lastMediaPlayed()
 {
-    return p_ml->history()->items( 100, 0 );
+    return p_ml->history(medialibrary::HistoryType::Global)->items( 100, 0 );
 }
 
 bool
@@ -230,13 +230,13 @@ AndroidMediaLibrary::addToHistory( const std::string& mrl, const std::string& ti
 std::vector<medialibrary::MediaPtr>
 AndroidMediaLibrary::lastStreamsPlayed()
 {
-    return p_ml->streamHistory()->items( 100, 0 );
+    return p_ml->history(medialibrary::HistoryType::Network)->items( 100, 0 );
 }
 
 bool
 AndroidMediaLibrary::clearHistory()
 {
-    return p_ml->clearHistory();
+    return p_ml->clearHistory(medialibrary::HistoryType::Global);
 }
 
 medialibrary::SearchAggregate



More information about the Android mailing list