Support publisher webpage in Vorbis comments
This commit is contained in:
parent
0f669c88a7
commit
b1bca85ef4
3
tag.h
3
tag.h
|
@ -126,6 +126,7 @@ enum class KnownField : unsigned int {
|
|||
ProductionCopyright, /** production copyright */
|
||||
License, /** license */
|
||||
TermsOfUse, /** terms of use */
|
||||
PublisherWebpage, /** the publisher's official webpage */
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -136,7 +137,7 @@ constexpr KnownField firstKnownField = KnownField::Title;
|
|||
/*!
|
||||
* \brief The last valid entry in the TagParser::KnownField enum.
|
||||
*/
|
||||
constexpr KnownField lastKnownField = KnownField::TermsOfUse;
|
||||
constexpr KnownField lastKnownField = KnownField::PublisherWebpage;
|
||||
|
||||
/*!
|
||||
* \brief The number of valid entries in the TagParser::KnownField enum.
|
||||
|
|
|
@ -109,6 +109,8 @@ VorbisComment::IdentifierType VorbisComment::internallyGetFieldId(KnownField fie
|
|||
return std::string(bpm());
|
||||
case KnownField::Publisher:
|
||||
return std::string(publisher());
|
||||
case KnownField::PublisherWebpage:
|
||||
return std::string(publisherWebpage());
|
||||
default:
|
||||
return std::string();
|
||||
}
|
||||
|
@ -149,6 +151,7 @@ KnownField VorbisComment::internallyGetKnownField(const IdentifierType &id) cons
|
|||
{ rating(), KnownField::Rating },
|
||||
{ bpm(), KnownField::Bpm },
|
||||
{ publisher(), KnownField::Publisher },
|
||||
{ publisherWebpage(), KnownField::PublisherWebpage },
|
||||
});
|
||||
// clang-format on
|
||||
const auto knownField(fieldMap.find(id));
|
||||
|
|
|
@ -189,6 +189,10 @@ constexpr TAG_PARSER_EXPORT std::string_view bpm()
|
|||
{
|
||||
return "BPM";
|
||||
}
|
||||
constexpr TAG_PARSER_EXPORT std::string_view publisherWebpage()
|
||||
{
|
||||
return "WWWPUBLISHER";
|
||||
}
|
||||
|
||||
} // namespace VorbisCommentIds
|
||||
|
||||
|
|
Loading…
Reference in New Issue