Add mapping for BPM in Vorbis Comments

This commit is contained in:
Martchus 2022-08-12 00:37:25 +02:00
parent 63c76e6ca4
commit 6da62db035
2 changed files with 7 additions and 0 deletions

View File

@ -105,6 +105,8 @@ VorbisComment::IdentifierType VorbisComment::internallyGetFieldId(KnownField fie
return std::string(isrc());
case KnownField::Rating:
return std::string(rating());
case KnownField::Bpm:
return std::string(bpm());
default:
return std::string();
}
@ -143,6 +145,7 @@ KnownField VorbisComment::internallyGetKnownField(const IdentifierType &id) cons
{ director(), KnownField::Director },
{ isrc(), KnownField::ISRC },
{ rating(), KnownField::Rating },
{ bpm(), KnownField::Bpm },
});
// clang-format on
const auto knownField(fieldMap.find(id));

View File

@ -185,6 +185,10 @@ constexpr TAG_PARSER_EXPORT std::string_view cover()
{
return "METADATA_BLOCK_PICTURE";
}
constexpr TAG_PARSER_EXPORT std::string_view bpm()
{
return "BPM";
}
} // namespace VorbisCommentIds