[PATCH 5/6] Add missing fields in MP4 saving



Two fields that were read were not saved, add them.
---
 src/mp4_tag.cc | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/mp4_tag.cc b/src/mp4_tag.cc
index 544a699..df546e0 100644
--- a/src/mp4_tag.cc
+++ b/src/mp4_tag.cc
@@ -255,6 +255,25 @@ gboolean Mp4tag_Write_File_Tag (ET_File *ETFile)
         tag->setAlbum (string);
     }
 
+    /****************
+     * Album Artist *
+     ****************/
+    if (FileTag->album_artist && *(FileTag->album_artist))
+    {
+        TagLib::String string (FileTag->album_artist, TagLib::String::UTF8);
+        extra_tag.insert ("aART", TagLib::MP4::Item (string));
+    }
+
+    /* Disc number. */
+    if (FileTag->disc_number && FileTag->disc_total)
+    {
+       gchar *numtot = g_strdup_printf ("%s/%s", FileTag->disc_number, FileTag->disc_total);
+       TagLib::String string (numtot, TagLib::String::UTF8);
+       g_free(numtot);
+
+       extra_tag.insert ("disk", TagLib::MP4::Item (string));
+    }
+
     /********
      * Year *
      ********/
-- 
1.8.3.2



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