[easytag/wip/taglib-mp4-cxx: 13/13] MP4 TagLib C++ WIP



commit fe98037a134619e3ce8ba7d762860e01bbd7e1bb
Author: David King <amigadave amigadave com>
Date:   Sat Mar 15 10:33:48 2014 +0000

    MP4 TagLib C++ WIP

 src/mp4_tag.cc |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/mp4_tag.cc b/src/mp4_tag.cc
index 6eae914..eb50d72 100644
--- a/src/mp4_tag.cc
+++ b/src/mp4_tag.cc
@@ -94,10 +94,19 @@ gboolean Mp4tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
      *********/
     FileTag->album = g_strdup (tag->title ().toCString (true));
 
+    const TagLib::PropertyMap extra_tag = tag->properties ();
+
     /****************
      * Album Artist *
      ****************/
-    /* TODO: No album artist or disc number support in the TagLib C API! */
+    /* TODO: No album artist support in the TagLib C API! */
+
+    /* Disc number. */
+    const TagLib::StringList &disc_number = extra_tag["DISCNUMBER"];
+    if (!disc_number.isEmpty ())
+    {
+        FileTag->disc_number = atoi (disc_number.front ());
+    }
 
     /********
      * Year *


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