Map "popularity meter" of ID3v2 tags to the generic rating field

See https://github.com/Martchus/tageditor/issues/84
This commit is contained in:
Martchus 2022-06-15 23:50:15 +02:00
parent 7a70a8e098
commit 1457dec990
3 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@ 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_APP_DESCRIPTION "C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags")
set(META_VERSION_MAJOR 11) set(META_VERSION_MAJOR 11)
set(META_VERSION_MINOR 2) set(META_VERSION_MINOR 2)
set(META_VERSION_PATCH 1) set(META_VERSION_PATCH 2)
set(META_REQUIRED_CPP_UNIT_VERSION 1.14.0) set(META_REQUIRED_CPP_UNIT_VERSION 1.14.0)
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON) set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)

View File

@ -79,6 +79,8 @@ std::uint32_t convertToShortId(std::uint32_t id)
return sRemixedBy; return sRemixedBy;
case lCopyright: case lCopyright:
return sCopyright; return sCopyright;
case lRating:
return sRating;
case lISRC: case lISRC:
return sISRC; return sISRC;
default: default:
@ -145,6 +147,8 @@ std::uint32_t convertToLongId(std::uint32_t id)
return lRemixedBy; return lRemixedBy;
case sCopyright: case sCopyright:
return lCopyright; return lCopyright;
case sRating:
return lRating;
case sISRC: case sISRC:
return lISRC; return lISRC;
default: default:

View File

@ -307,6 +307,8 @@ KnownField Id3v2Tag::internallyGetKnownField(const IdentifierType &id) const
return KnownField::OriginalReleaseDate; return KnownField::OriginalReleaseDate;
case lMood: case lMood:
return KnownField::Mood; return KnownField::Mood;
case lRating:
return KnownField::Rating;
case lISRC: case lISRC:
return KnownField::ISRC; return KnownField::ISRC;
case sAlbum: case sAlbum:
@ -349,6 +351,8 @@ KnownField Id3v2Tag::internallyGetKnownField(const IdentifierType &id) const
return KnownField::RemixedBy; return KnownField::RemixedBy;
case sCopyright: case sCopyright:
return KnownField::Copyright; return KnownField::Copyright;
case sRating:
return KnownField::Rating;
case sISRC: case sISRC:
return KnownField::ISRC; return KnownField::ISRC;
default: default: