Add more time-related ID3v2 IDs

This commit is contained in:
Martchus 2020-04-22 19:14:34 +02:00
parent 248a6555f3
commit 8f3eae59f1
4 changed files with 35 additions and 7 deletions

View File

@ -9,8 +9,8 @@ set(META_APP_AUTHOR "Martchus")
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags")
set(META_VERSION_MAJOR 9)
set(META_VERSION_MINOR 1)
set(META_VERSION_PATCH 4)
set(META_VERSION_MINOR 2)
set(META_VERSION_PATCH 0)
set(META_REQUIRED_CPP_UNIT_VERSION 1.14.0)
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)

View File

@ -35,8 +35,16 @@ std::uint32_t convertToShortId(std::uint32_t id)
return sComment;
case lYear:
return sYear;
case lRecordDate:
case lOriginalYear:
return sOriginalYear;
case lRecordingDates:
return sRecordingDates;
case lRecordingTime:
return sRecordDate;
case lDate:
return sDate;
case lTime:
return sTime;
case lTitle:
return sTitle;
case lGenre:
@ -89,8 +97,16 @@ std::uint32_t convertToLongId(std::uint32_t id)
return lComment;
case sYear:
return lYear;
case sOriginalYear:
return lOriginalYear;
case sRecordDate:
return lRecordDate;
return lRecordingTime;
case sRecordingDates:
return lRecordingDates;
case sDate:
return lDate;
case sTime:
return lTime;
case sTitle:
return lTitle;
case sGenre:

View File

@ -13,7 +13,15 @@ enum KnownValue : std::uint32_t {
lArtist = 0x54504531,
lComment = 0x434f4d4d,
lYear = 0x54594552,
lRecordDate = 0x54445243,
lOriginalYear = 0x544F5259,
lRecordingDates = 0x54524441,
lDate = 0x54444154,
lTime = 0x54494D45,
lRecordDate = 0x54445243, // FIXME v10: remove in favor of lRecordingTime
lRecordingTime = 0x54445243,
lReleaseTime = 0x5444524C,
lOriginalReleaseTime = 0x54444F52,
lTaggingTime = 0x54445447,
lTitle = 0x54495432,
lGenre = 0x54434f4e,
lTrackPosition = 0x5452434b,
@ -39,7 +47,11 @@ enum KnownValue : std::uint32_t {
sArtist = 0x545031,
sComment = 0x434f4d,
sYear = 0x545945,
sOriginalYear = 0x544F5259,
sRecordingDates = 0x545244,
sRecordDate = 0x545243,
sDate = 0x544441,
sTime = 0x54494D,
sTitle = 0x545432,
sGenre = 0x54434f,
sTrackPosition = 0x54524b,

View File

@ -148,7 +148,7 @@ Id3v2Tag::IdentifierType Id3v2Tag::internallyGetFieldId(KnownField field) const
case KnownField::Year:
return lYear;
case KnownField::RecordDate:
return lRecordDate;
return lRecordingTime;
case KnownField::Title:
return lTitle;
case KnownField::Genre:
@ -253,7 +253,7 @@ KnownField Id3v2Tag::internallyGetKnownField(const IdentifierType &id) const
return KnownField::Comment;
case lYear:
return KnownField::Year;
case lRecordDate:
case lRecordingTime:
return KnownField::RecordDate;
case lTitle:
return KnownField::Title;