Implemented the most easy comments on the pull request.

This commit is contained in:
Michael Helmling 2012-01-14 22:02:17 +01:00
parent ea41cd8903
commit 67d896e6a7
4 changed files with 15 additions and 12 deletions

View 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)

View 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")) {

View 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 &);

View 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" },