[vlc-commits] qt: store thumbnails inside mlAlbumTrack

Prince Gupta git at videolan.org
Wed Jun 3 13:23:41 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Tue Jun  2 18:54:45 2020 +0530| [fce4a4d031cf2ce011af5d9b2495002043a000da] | committer: Pierre Lamot

qt: store thumbnails inside mlAlbumTrack

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

 modules/gui/qt/medialibrary/mlalbumtrack.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/gui/qt/medialibrary/mlalbumtrack.cpp b/modules/gui/qt/medialibrary/mlalbumtrack.cpp
index 63bca77d90..56eff2a63a 100644
--- a/modules/gui/qt/medialibrary/mlalbumtrack.cpp
+++ b/modules/gui/qt/medialibrary/mlalbumtrack.cpp
@@ -52,6 +52,13 @@ MLAlbumTrack::MLAlbumTrack(vlc_medialibrary_t* _ml, const vlc_ml_media_t *_data,
             break;
         }
 
+    for( const vlc_ml_thumbnail_t& thumbnail: _data->thumbnails )
+        if( thumbnail.b_generated )
+        {
+            m_cover = QString::fromUtf8(thumbnail.psz_mrl);
+            break;
+        }
+
     if ( _data->album_track.i_album_id != 0 )
     {
         ml_unique_ptr<vlc_ml_album_t> album(vlc_ml_get_album(_ml, _data->album_track.i_album_id));



More information about the vlc-commits mailing list