Skip to content

Commit

Permalink
Fix property mappings
Browse files Browse the repository at this point in the history
For MP4 map ENCODEDBY to ©enc instead of ©too, which is now mapped to
ENCODING.
For ASF, add new properties ENCODINGTIME (WM/EncodingTime) and FILEWEBPAGE
(WM/AudioFileURL).
  • Loading branch information
ufleisch committed Dec 23, 2023
1 parent 1a1ee8b commit 0abcd77
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ TagLib 2.0 (Jan 24, 2024)
- The stream operator for String uses UTF-8 instead of ISO-8859-1 encoding.
- MP4 property ORIGINALDATE is mapped to "----:com.apple.iTunes:ORIGINALDATE"
instead of "----:com.apple.iTunes:originaldate".
- MP4 property ENCODEDBY is mapped to "©enc" instead of "©too", which is now
mapped to ENCODING.
* Unified interface for complex properties like pictures.
* Simplified the unified properties interface by providing its methods on
FileRef.
Expand All @@ -97,8 +99,9 @@ TagLib 2.0 (Jan 24, 2024)
* Build system: Fixed PackageConfig to support both relative and absolute paths.
* Build system: utf8cpp is no longer included, it can be provided via a system
package or a Git submodule.
* ASF: Support additional properties ARTISTWEBPAGE, ENCODING, INITIALKEY,
ORIGINALALBUM, ORIGINALARTIST, ORIGINALFILENAME, ORIGINALLYRICIST.
* ASF: Support additional properties ARTISTWEBPAGE, ENCODING, ENCODINGTIME,
FILEWEBPAGE, INITIALKEY, ORIGINALALBUM, ORIGINALARTIST, ORIGINALFILENAME,
ORIGINALLYRICIST.
* ID3v2: Fixed extensibility of FrameFactory, use it also for WAV and AIFF
files.
* MP4: Support additional properties OWNER, RELEASEDATE.
Expand Down
2 changes: 2 additions & 0 deletions taglib/asf/asftag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ namespace
std::pair("WM/Barcode", "BARCODE"),
std::pair("WM/EncodedBy", "ENCODEDBY"),
std::pair("WM/EncodingSettings", "ENCODING"),
std::pair("WM/EncodingTime", "ENCODINGTIME"),
std::pair("WM/AudioFileURL", "FILEWEBPAGE"),
std::pair("WM/AlbumSortOrder", "ALBUMSORT"),
std::pair("WM/AlbumArtistSortOrder", "ALBUMARTISTSORT"),
std::pair("WM/ArtistSortOrder", "ARTISTSORT"),
Expand Down
3 changes: 2 additions & 1 deletion taglib/mp4/mp4itemfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ Map<ByteVector, String> ItemFactory::namePropertyMap() const
{"tmpo", "BPM"},
{"cprt", "COPYRIGHT"},
{"\251lyr", "LYRICS"},
{"\251too", "ENCODEDBY"},
{"\251too", "ENCODING"},
{"\251enc", "ENCODEDBY"},
{"soal", "ALBUMSORT"},
{"soaa", "ALBUMARTISTSORT"},
{"soar", "ARTISTSORT"},
Expand Down
12 changes: 6 additions & 6 deletions taglib/toolkit/propertymapping.dox
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
| DISCNUMBER | TPOS | | disk | DISC | WM/PartOfSet |
| DISCSUBTITLE | TSST | PRT1 | \----:com.apple.iTunes:DISCSUBTITLE | | WM/SetSubTitle |
| DJMIXER | | | \----:com.apple.iTunes:DJMIXER | | |
| ENCODEDBY | TENC | ITCH | &copy;too | | WM/EncodedBy |
| ENCODING | TSSE | ISFT | | | WM/EncodingSettings |
| ENCODINGTIME | TDEN | IDIT | | | |
| ENCODEDBY | TENC | ITCH | &copy;enc | | WM/EncodedBy |
| ENCODING | TSSE | ISFT | &copy;too | | WM/EncodingSettings |
| ENCODINGTIME | TDEN | IDIT | | | WM/EncodingTime |
| ENGINEER | | | \----:com.apple.iTunes:ENGINEER | | |
| FILETYPE | TFLT | | | | |
| FILEWEBPAGE | WOAF | | | | |
| FILEWEBPAGE | WOAF | | | | WM/AudioFileURL |
| GAPLESSPLAYBACK | | | pgap | | |
| GENRE | TCON | IGNR | &copy;gen | | WM/Genre |
| GROUPING | GRP1 | | &copy;grp | | |
Expand All @@ -50,9 +50,9 @@
| ISRC | TSRC | ISRC | \----:com.apple.iTunes:ISRC | | WM/ISRC |
| LABEL | TPUB | IPUB | \----:com.apple.iTunes:LABEL | | WM/Publisher |
| LANGUAGE | TLAN | ILNG | \----:com.apple.iTunes:LANGUAGE | | WM/Language |
| LENGTH | TLEN | | \----:com.apple.iTunes:LYRICIST | | |
| LENGTH | TLEN | | | | |
| LICENSE | | | \----:com.apple.iTunes:LICENSE | | |
| LYRICIST | TEXT | IWRI | | | WM/Writer |
| LYRICIST | TEXT | IWRI | \----:com.apple.iTunes:LYRICIST | | WM/Writer |
| LYRICS | USLT | | &copy;lyr | | WM/Lyrics |
| MEDIA | TMED | IMED | \----:com.apple.iTunes:MEDIA | | WM/Media |
| MIXER | | | \----:com.apple.iTunes:MIXER | | |
Expand Down
2 changes: 2 additions & 0 deletions tests/test_asf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ class TestASF : public CppUnit::TestFixture
tags["DISCSUBTITLE"] = StringList("Disc Subtitle");
tags["ENCODEDBY"] = StringList("Encoded by");
tags["ENCODING"] = StringList("Encoding");
tags["ENCODINGTIME"] = StringList("2021-01-03 11:52:19");
tags["FILEWEBPAGE"] = StringList("File Webpage");
tags["GENRE"] = StringList("Genre");
tags["WORK"] = StringList("Grouping");
tags["INITIALKEY"] = StringList("Initial Key");
Expand Down
3 changes: 2 additions & 1 deletion tests/test_mp4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ class TestMP4 : public CppUnit::TestFixture
tags["DISCSUBTITLE"] = StringList("Disc Subtitle");
tags["DJMIXER"] = StringList("DJ Mixer");
tags["ENCODEDBY"] = StringList("Encoded by");
tags["ENCODING"] = StringList("Encoding");
tags["ENGINEER"] = StringList("Engineer");
tags["GAPLESSPLAYBACK"] = StringList("1");
tags["GENRE"] = StringList("Genre");
Expand Down Expand Up @@ -732,7 +733,7 @@ class TestMP4 : public CppUnit::TestFixture

PropertyMap properties = f.properties();
CPPUNIT_ASSERT_EQUAL(StringList("Test Artist!!!!"), properties["ARTIST"]);
CPPUNIT_ASSERT_EQUAL(StringList("FAAC 1.24"), properties["ENCODEDBY"]);
CPPUNIT_ASSERT_EQUAL(StringList("FAAC 1.24"), properties["ENCODING"]);
}
}

Expand Down

0 comments on commit 0abcd77

Please sign in to comment.