Skip to content

Commit

Permalink
Rename KnownField::Website to KnownField::PerformerWebpage
Browse files Browse the repository at this point in the history
For consistency with `KnownField::PublisherWebpage`. This is also probably
what the Vorbis Comment field `WEBSITE` is used for (considering there's
the distinct field `WWWPUBLISHER` for the publisher webpage).
  • Loading branch information
Martchus committed Oct 20, 2024
1 parent 043ed89 commit c84f370
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions id3/id3v2tag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Id3v2Tag::IdentifierType Id3v2Tag::internallyGetFieldId(KnownField field) const
return lKey;
case KnownField::PublisherWebpage:
return lPublisherWebpage;
case KnownField::Website:
case KnownField::PerformerWebpage:
return lPerformerWebpage;
case KnownField::PurchaseItem:
return lPaymentWebpage;
Expand Down Expand Up @@ -270,7 +270,7 @@ Id3v2Tag::IdentifierType Id3v2Tag::internallyGetFieldId(KnownField field) const
return sKey;
case KnownField::PublisherWebpage:
return sPublisherWebpage;
case KnownField::Website:
case KnownField::PerformerWebpage:
return sPerformerWebpage;
default:;
}
Expand Down Expand Up @@ -352,7 +352,7 @@ KnownField Id3v2Tag::internallyGetKnownField(const IdentifierType &id) const
case lPublisherWebpage:
return KnownField::PublisherWebpage;
case lPerformerWebpage:
return KnownField::Website;
return KnownField::PerformerWebpage;
case lPaymentWebpage:
return KnownField::PurchaseItem;
case sAlbum:
Expand Down Expand Up @@ -414,7 +414,7 @@ KnownField Id3v2Tag::internallyGetKnownField(const IdentifierType &id) const
case sPublisherWebpage:
return KnownField::PublisherWebpage;
case sPerformerWebpage:
return KnownField::Website;
return KnownField::PerformerWebpage;
default:
return KnownField::Invalid;
}
Expand Down
2 changes: 1 addition & 1 deletion tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ enum class KnownField : unsigned int {
PublisherWebpage, /** the publisher's official webpage */
StoreDescription, /** store description */
MediaType, /** the media type, e.g. movie vs. music vs. audiobook (only used by MP4 so far) */
Website, /** the URL to a website related to the tagged file */
PerformerWebpage, /** the URL to the performer's website or a website generally related to the tagged file */
ContentRating, /** whether the content is rated "clean" or "explicit" (only used by MP4 so far) */
};

Expand Down
4 changes: 2 additions & 2 deletions vorbis/vorbiscomment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ VorbisComment::IdentifierType VorbisComment::internallyGetFieldId(KnownField fie
return std::string(publisher());
case KnownField::PublisherWebpage:
return std::string(publisherWebpage());
case KnownField::Website:
case KnownField::PerformerWebpage:
return std::string(website());
case KnownField::Arranger:
return std::string(arranger());
Expand Down Expand Up @@ -156,7 +156,7 @@ KnownField VorbisComment::internallyGetKnownField(const IdentifierType &id) cons
{ bpm(), KnownField::Bpm },
{ publisher(), KnownField::Publisher },
{ publisherWebpage(), KnownField::PublisherWebpage },
{ website(), KnownField::Website },
{ website(), KnownField::PerformerWebpage },
{ arranger(), KnownField::Arranger },
});
// clang-format on
Expand Down

0 comments on commit c84f370

Please sign in to comment.