diff --git a/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h b/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h index e1992635a..53bdd6d15 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h @@ -203,7 +203,7 @@ class TAGLIB_EXPORT ChapterFrame : public ID3v2::Frame { String toString() const override; - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * CHAP frames each have a unique element ID. This searches for a CHAP frame with the element ID \a eID and returns a pointer to it. diff --git a/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h index bd3845ab4..d0c8c6f84 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h @@ -140,7 +140,7 @@ class TAGLIB_EXPORT CommentsFrame : public Frame { * - otherwise, the key will be "COMMENT:" * - The single value will be the frame's text(). */ - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * Comments each have a unique description. diff --git a/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h index bfebb4e64..67adbfd05 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h @@ -202,7 +202,7 @@ class TAGLIB_EXPORT TableOfContentsFrame : public ID3v2::Frame { String toString() const override; - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * CTOC frames each have a unique element ID. diff --git a/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h b/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h index fdbd5f874..f563fe660 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h @@ -185,7 +185,7 @@ class TAGLIB_EXPORT TextIdentificationFrame : public Frame { */ static const KeyConversionMap &involvedPeopleMap(); - PropertyMap asProperties() const; + PropertyMap asProperties() const override; protected: // Reimplementations. @@ -270,7 +270,7 @@ class TAGLIB_EXPORT UserTextIdentificationFrame : public TextIdentificationFrame * - The values will be copies of the fieldList(). * - If the description() appears as value in fieldList(), it will be omitted in the value list, in order to be compatible with TagLib which copies the description() into the fieldList(). */ - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * Searches for the user defined text frame with the description \a description in \a tag. diff --git a/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h b/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h index 4ad9edea3..52c127e08 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h @@ -89,7 +89,7 @@ class TAGLIB_EXPORT UniqueFileIdentifierFrame : public ID3v2::Frame { String toString() const override; - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * UFID frames each have a unique owner. This searches for a UFID frame with the owner \a o and returns a pointer to it. diff --git a/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.cpp b/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.cpp index c92b41fe7..8faf2018a 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.cpp +++ b/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.cpp @@ -24,6 +24,7 @@ ***************************************************************************/ #include "unknownframe.h" +#include "tpropertymap.h" using namespace Strawberry_TagLib::TagLib; using namespace ID3v2; @@ -74,3 +75,11 @@ UnknownFrame::UnknownFrame(const ByteVector &data, Header *h) : Frame(h), d(new UnknownFramePrivate()) { parseFields(fieldData(data)); } + +PropertyMap UnknownFrame::asProperties() const { + + PropertyMap m; + m.unsupportedData().append("UNKNOWN/" + frameID()); + return m; + +} diff --git a/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h b/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h index 6669da4f4..7f6ddfe60 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h @@ -59,6 +59,8 @@ class TAGLIB_EXPORT UnknownFrame : public Frame { */ ByteVector data() const; + PropertyMap asProperties() const override; + protected: void parseFields(const ByteVector &data) override; ByteVector renderFields() const override; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h index 473650baa..1b6f396b8 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h @@ -140,7 +140,7 @@ class TAGLIB_EXPORT UnsynchronizedLyricsFrame : public Frame { * - The single value will be the frame's text(). * Note that currently the language() field is not supported by the PropertyMap interface. */ - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * LyricsFrames each have a unique description. diff --git a/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h b/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h index 792e5920b..70e365ad2 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h @@ -68,7 +68,7 @@ class TAGLIB_EXPORT UrlLinkFrame : public Frame { void setText(const String &s) override; String toString() const override; - PropertyMap asProperties() const; + PropertyMap asProperties() const override; protected: void parseFields(const ByteVector &data) override; @@ -155,7 +155,7 @@ class TAGLIB_EXPORT UserUrlLinkFrame : public UrlLinkFrame { * characters), the returned map will contain an entry "WXXX/" * in its unsupportedData() list. */ - PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * Searches for the user defined url frame with the description \a description in \a tag. diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2frame.cpp b/3rdparty/taglib/mpeg/id3v2/id3v2frame.cpp index 880067db5..3a5afd237 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2frame.cpp +++ b/3rdparty/taglib/mpeg/id3v2/id3v2frame.cpp @@ -447,30 +447,8 @@ String Frame::keyToTXXX(const String &s) { PropertyMap Frame::asProperties() const { - if (dynamic_cast(this)) { - PropertyMap m; - m.unsupportedData().append("UNKNOWN/" + frameID()); - return m; - } - const ByteVector &id = frameID(); - // workaround until this function is virtual - if (id == "TXXX") - return dynamic_cast(this)->asProperties(); - // Apple proprietary WFED (Podcast URL), MVNM (Movement Name), MVIN (Movement Number), GRP1 (Grouping) are in fact text frames. - else if (id[0] == 'T' || id == "WFED" || id == "MVNM" || id == "MVIN" || id == "GRP1") - return dynamic_cast(this)->asProperties(); - else if (id == "WXXX") - return dynamic_cast(this)->asProperties(); - else if (id[0] == 'W') - return dynamic_cast(this)->asProperties(); - else if (id == "COMM") - return dynamic_cast(this)->asProperties(); - else if (id == "USLT") - return dynamic_cast(this)->asProperties(); - else if (id == "UFID") - return dynamic_cast(this)->asProperties(); PropertyMap m; - m.unsupportedData().append(id); + m.unsupportedData().append(frameID()); return m; } diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2frame.h b/3rdparty/taglib/mpeg/id3v2/id3v2frame.h index 0185e8669..dadf9e616 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2frame.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2frame.h @@ -233,9 +233,8 @@ class TAGLIB_EXPORT Frame { /*! * Parses the contents of this frame as PropertyMap. * If that fails, the returned PropertyMap will be empty, and its unsupportedData() will contain this frame's ID. - * BIC: Will be a virtual function in future releases. */ - PropertyMap asProperties() const; + virtual PropertyMap asProperties() const; /*! * Returns an appropriate ID3 frame ID for the given free-form tag key. This method