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

Filip Roséen filip at atch.se
Fri Oct 14 11:44:46 CEST 2016


fixes #17494
---
 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
 
     /* */
-- 
2.10.0




More information about the vlc-devel mailing list