Use PCST and not TXXX:PODCAST frame for ID3v2 'PODCAST' property

This commit is contained in:
Urs Fleisch 2021-01-03 18:50:19 +01:00
parent f74b166435
commit f32d27973f
3 changed files with 15 additions and 0 deletions

View File

@ -24,6 +24,7 @@
***************************************************************************/
#include "podcastframe.h"
#include <tpropertymap.h>
using namespace TagLib;
using namespace ID3v2;
@ -55,6 +56,13 @@ String PodcastFrame::toString() const
return String();
}
PropertyMap PodcastFrame::asProperties() const
{
PropertyMap map;
map.insert("PODCAST", StringList());
return map;
}
////////////////////////////////////////////////////////////////////////////////
// protected members
////////////////////////////////////////////////////////////////////////////////

View File

@ -57,6 +57,8 @@ namespace TagLib {
*/
virtual String toString() const;
PropertyMap asProperties() const;
protected:
// Reimplementations.

View File

@ -40,6 +40,7 @@
#include "frames/commentsframe.h"
#include "frames/uniquefileidentifierframe.h"
#include "frames/unknownframe.h"
#include "frames/podcastframe.h"
using namespace TagLib;
using namespace ID3v2;
@ -120,6 +121,8 @@ Frame *Frame::createTextualFrame(const String &key, const StringList &values) //
UrlLinkFrame* frame = new UrlLinkFrame(frameID);
frame->setUrl(values.front());
return frame;
} else if(frameID == "PCST") {
return new PodcastFrame();
}
}
if(key == "MUSICBRAINZ_TRACKID" && values.size() == 1) {
@ -490,6 +493,8 @@ PropertyMap Frame::asProperties() const
return dynamic_cast< const UnsynchronizedLyricsFrame* >(this)->asProperties();
else if(id == "UFID")
return dynamic_cast< const UniqueFileIdentifierFrame* >(this)->asProperties();
else if(id == "PCST")
return dynamic_cast< const PodcastFrame* >(this)->asProperties();
PropertyMap m;
m.unsupportedData().append(id);
return m;