[vlc-commits] qt: medialib: Expose the reload function

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 9 16:54:48 CET 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Nov 27 18:06:28 2019 +0100| [db0705c98e89195d6c51c758907286c9a502357b] | committer: Hugo Beauzée-Luyssen

qt: medialib: Expose the reload function

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db0705c98e89195d6c51c758907286c9a502357b
---

 modules/gui/qt/medialibrary/medialib.cpp | 5 +++++
 modules/gui/qt/medialibrary/medialib.hpp | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/modules/gui/qt/medialibrary/medialib.cpp b/modules/gui/qt/medialibrary/medialib.cpp
index bd840c418c..5d1aa1fcae 100644
--- a/modules/gui/qt/medialibrary/medialib.cpp
+++ b/modules/gui/qt/medialibrary/medialib.cpp
@@ -211,6 +211,11 @@ void MediaLib::addAndPlay(const QVariantList& itemIdList)
     }
 }
 
+void MediaLib::reload()
+{
+    vlc_ml_reload_folder( vlcMl(), nullptr );
+}
+
 vlc_medialibrary_t* MediaLib::vlcMl()
 {
     return vlc_ml_instance_get( m_intf );
diff --git a/modules/gui/qt/medialibrary/medialib.hpp b/modules/gui/qt/medialibrary/medialib.hpp
index a3deb7d3d1..1b4eb708e9 100644
--- a/modules/gui/qt/medialibrary/medialib.hpp
+++ b/modules/gui/qt/medialibrary/medialib.hpp
@@ -57,6 +57,8 @@ public:
     Q_INVOKABLE void addAndPlay(const QUrl& mrl);
     Q_INVOKABLE void addAndPlay(const QVariantList&itemIdList);
 
+    Q_INVOKABLE void reload();
+
     inline bool idle() const { return m_idle; }
     inline int discoveryPending() const { return m_discoveryPending; }
     inline QString discoveryEntryPoint() const { return m_discoveryEntryPoint; }



More information about the vlc-commits mailing list