MCPcopy Create free account
hub / github.com/KDE/kid3 / removeCommentFrame

Function removeCommentFrame

src/plugins/taglibmetadata/taglibmpegsupport.cpp:372–385  ·  view source on GitHub ↗

* Remove the first COMM frame with an empty description. * * @param id3v2Tag ID3v2 tag */

Source from the content-addressed store, hash-verified

370 * @param id3v2Tag ID3v2 tag
371 */
372void removeCommentFrame(TagLib::ID3v2::Tag* id3v2Tag)
373{
374 const TagLib::ID3v2::FrameList& frameList = id3v2Tag->frameList("COMM");
375 for (auto it = frameList.begin();
376 it != frameList.end();
377 ++it) {
378 if (auto id3Frame =
379 dynamic_cast<TagLib::ID3v2::CommentsFrame*>(*it);
380 id3Frame && id3Frame->description().isEmpty()) {
381 id3v2Tag->removeFrame(id3Frame, true);
382 break;
383 }
384 }
385}
386
387void addTagLibFrame(TagLib::ID3v2::Tag* id3v2Tag, TagLib::ID3v2::Frame* frame)
388{

Callers 1

setId3v2UnicodeFunction · 0.85

Calls 2

isEmptyMethod · 0.80
descriptionMethod · 0.80

Tested by

no test coverage detected