All pastes #514058 Raw Edit

Someone

public text v1 · immutable
#514058 ·published 2007-05-27 15:06 UTC
rendered paste body
    if (mdata->Compilation())
    {

        UserTextIdentificationFrame *musicbrainz =
            new UserTextIdentificationFrame(TagLib::String::UTF8);
        taglib->ID3v2Tag()->addFrame(musicbrainz);
        musicbrainz->setDescription("MusicBrainz Album Artist Id");
        musicbrainz->setText(MYTH_MUSICBRAINZ_ALBUMARTIST_UUID);

        if (!mdata->CompilationArtist().isEmpty())
        {
            // Compilation Artist (TPE4)
            TextIdentificationFrame *tpeframe;

            TagLib::ID3v2::FrameList tpelist = taglib->ID3v2Tag()->frameListMap()["TPE4"];
            if (!tpelist.isEmpty())
            {
                tpeframe = (TextIdentificationFrame *)tpelist.front();
            }
            else {
                tpeframe = new TextIdentificationFrame(TagLib::ByteVector("TPE4"), TagLib::String::UTF8);
                taglib->ID3v2Tag()->addFrame(tpeframe);
            }

            tpeframe->setText(QStringToTString(mdata->CompilationArtist()));
        }
    }