]> granicus.if.org Git - taglib/commitdiff
Implemented the most easy comments on the pull request.
authorMichael Helmling <helmling@mathematik.uni-kl.de>
Sat, 14 Jan 2012 21:02:17 +0000 (22:02 +0100)
committerMichael Helmling <helmling@mathematik.uni-kl.de>
Sat, 14 Jan 2012 21:02:17 +0000 (22:02 +0100)
CMakeLists.txt
taglib/ape/apetag.cpp
taglib/it/itfile.h
taglib/mpeg/id3v2/id3v2dicttools.cpp

index 0c0c9097e8e0fb10fad554dcb469b913a3d1348c..d6976634055cdf6b008d907d6d88e36d27335d30 100644 (file)
@@ -16,8 +16,8 @@ if(VISIBILITY_HIDDEN)
   add_definitions (-fvisibility=hidden)
 endif()
 
-option(BUILD_TESTS "Build the test suite"  OFF)
-option(BUILD_EXAMPLES "Build the examples"  OFF)
+option(BUILD_TESTS "Build the test suite"  ON)
+option(BUILD_EXAMPLES "Build the examples"  ON)
 
 option(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs"  OFF)
 
index 92d106c44dd2ab0192e31ad043f687981925a62a..e1bf40c2d954ad1e403ca64b72a426f06df8ac91 100644 (file)
@@ -187,15 +187,17 @@ TagDict APE::Tag::toDict() const
       tagName = "TRACKNUMBER";
     else if (tagName == "YEAR")
       tagName = "DATE";
+    else if (tagName == "ALBUM ARTIST")
+      tagName = "ALBUMARTIST";
     if (it->second.type() == Item::Text)
       dict[tagName].append(it->second.toStringList());
   }
   return dict;
 }
 
-void APE::Tag::fromDict(const TagDict &orig_dict)
+void APE::Tag::fromDict(const TagDict &origDict)
 {
-  TagDict dict(orig_dict); // make a local copy that can be modified
+  TagDict dict(origDict); // make a local copy that can be modified
 
   // see comment in toDict() about TRACKNUMBER and YEAR
   if (dict.contains("TRACKNUMBER")) {
index e4a744e964985d28ce1c0f9ddadacc4aeb908c59..81b6c157eba0a219400d3a9efe0b81400b85e4e5 100644 (file)
@@ -61,14 +61,14 @@ namespace TagLib {
         Mod::Tag *tag() const;
 
         /*!
-         * Implements the unified tag dictionary interface -- export function.
          * Forwards to Mod::Tag::toDict().
+         * BIC: will be removed once File::toDict() is made virtual
          */
         TagDict toDict() const;
 
         /*!
-         * Implements the unified tag dictionary interface -- import function.
          * Forwards to Mod::Tag::fromDict().
+         * BIC: will be removed once File::fromDict() is made virtual
          */
         void fromDict(const TagDict &);
 
index 498f92edce2e6b15d561a5916c4031a591981847..7ee6c83dc302277280a45d67403ccda338fff490 100644 (file)
@@ -57,7 +57,7 @@ namespace TagLib {
     /*!
      * A map of translations frameID <-> tag used by the unified dictionary interface.
      */
-    static const uint numid3frames = 54;
+    static const uint numid3frames = 55;
     static const char *id3frames[][2] = {
       // Text information frames
       { "TALB", "ALBUM"},
@@ -67,14 +67,14 @@ namespace TagLib {
       { "TCOP", "COPYRIGHT" },
       { "TDEN", "ENCODINGTIME" },
       { "TDLY", "PLAYLISTDELAY" },
-      { "TDOR", "ORIGINALRELEASETIME" },
+      { "TDOR", "ORIGINALDATE" },
       { "TDRC", "DATE" },
       // { "TRDA", "DATE" }, // id3 v2.3, replaced by TDRC in v2.4
       // { "TDAT", "DATE" }, // id3 v2.3, replaced by TDRC in v2.4
       // { "TYER", "DATE" }, // id3 v2.3, replaced by TDRC in v2.4
       // { "TIME", "DATE" }, // id3 v2.3, replaced by TDRC in v2.4
-      { "TDRL", "RELEASETIME" },
-      { "TDTG", "TAGGINGTIME" },
+      { "TDRL", "RELEASEDATE" },
+      { "TDTG", "TAGGINGDATE" },
       { "TENC", "ENCODEDBY" },
       { "TEXT", "LYRICIST" },
       { "TFLT", "FILETYPE" },
@@ -94,9 +94,9 @@ namespace TagLib {
       { "TOPE", "ORIGINALARTIST" },
       { "TOWN", "OWNER" },
       { "TPE1", "ARTIST"},
-      { "TPE2", "PERFORMER" },
+      { "TPE2", "ALBUMARTIST" }, // id3's spec says 'PERFORMER', but most programs use 'ALBUMARTIST'
       { "TPE3", "CONDUCTOR" },
-      { "TPE4", "ARRANGER" },
+      { "TPE4", "REMIXER" }, // could also be ARRANGER
       { "TPOS", "DISCNUMBER" },
       { "TPRO", "PRODUCEDNOTICE" },
       { "TPUB", "PUBLISHER" },
@@ -106,6 +106,7 @@ namespace TagLib {
       { "TSOA", "ALBUMSORT" },
       { "TSOP", "ARTISTSORT" },
       { "TSOT", "TITLESORT" },
+      { "TSO2", "ALBUMARTISTSORT" }, // non-standard, used by iTunes
       { "TSRC", "ISRC" },
       { "TSSE", "ENCODING" },