[vlc-commits] meta_engine/taglib: read lyrics tag in Id3v2

Filip Roséen git at videolan.org
Wed Nov 16 15:26:08 CET 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Oct 14 11:44:46 2016 +0200| [b2b29786183dab2237423f3708ade6b3858ff62c] | committer: Jean-Baptiste Kempf

meta_engine/taglib: read lyrics tag in Id3v2

fixes #17494

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/meta_engine/taglib.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 4e5df57..6d051ba 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -519,12 +519,21 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_meta_t* p_demux_meta, vlc_
         vlc_meta_Set##metaName( p_meta,                                        \
                                 (*list.begin())->toString().toCString( true ) );
 
+#define SET_EXTRA( tagName, metaName )\
+    list = tag->frameListMap()[tagName];\
+    if( !list.isEmpty() )\
+        vlc_meta_AddExtra( p_meta, metaName,\
+                           (*list.begin())->toString().toCString( true ) );
+
+
     SET( "TCOP", Copyright );
     SET( "TENC", EncodedBy );
     SET( "TLAN", Language );
     SET( "TPUB", Publisher );
     SET( "TPE2", AlbumArtist );
+    SET_EXTRA( "USLT", "Lyrics" );
 
+#undef SET_EXTRA
 #undef SET
 
     /* */



More information about the vlc-commits mailing list