[easytag/easytag-2-2] Support album artist in WavPack tags



commit 39e5560e3e39764b4152e748898d8e4ef9405919
Author: David King <amigadave amigadave com>
Date:   Sun Dec 21 19:30:33 2014 +0000

    Support album artist in WavPack tags

 src/wavpack_tag.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/wavpack_tag.c b/src/wavpack_tag.c
index 457a197..1bfda08 100644
--- a/src/wavpack_tag.c
+++ b/src/wavpack_tag.c
@@ -102,6 +102,16 @@ gboolean Wavpack_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
 
     memset (field, '\0', MAXLEN);
 
+    /* Album artist. */
+    length = WavpackGetTagItem (wpc, "album artist", field, MAXLEN);
+
+    if (length > 0 && FileTag->album_artist == NULL)
+    {
+        FileTag->album_artist = Try_To_Validate_Utf8_String (field);
+    }
+
+    memset (field, '\0', MAXLEN);
+
     /*
      * Album
      */
@@ -284,6 +294,14 @@ gboolean Wavpack_Tag_Write_File_Tag (ET_File *ETFile)
         return FALSE;
     }
 
+    /* Album artist. */
+    if (FileTag->album_artist
+        && WavpackAppendTagItem (wpc, "album artist", FileTag->album_artist,
+                                 strlen (FileTag->album_artist)) == 0)
+    {
+        return FALSE;
+    }
+
     /*
      * Album
      */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]