ID3_Frame* ID3_AddLyricist(ID3_Tag *tag, const char *text, bool bReplace) { ID3_Frame* pFrame = NULL; if (NULL != tag && NULL != text && strlen(text) > 0) { if (bReplace) { ID3_RemoveLyricist(tag); } if (bReplace || (tag->Find(ID3FID_LYRICIST) == NULL)) { pFrame = new ID3_Frame(ID3FID_LYRICIST); if (pFrame) { pFrame->Field(ID3FN_TEXT) = text; tag->AttachFrame(pFrame); } } } return pFrame; }
ID3_Frame* ID3_AddLyricist(ID3_Tag *tag, const char *text, bool replace) { ID3_Frame* frame = NULL; if (NULL != tag && NULL != text && strlen(text) > 0) { if (replace) { ID3_RemoveLyricist(tag); } if (replace || (tag->Find(ID3FID_LYRICIST) == NULL)) { frame = new ID3_Frame(ID3FID_LYRICIST); if (frame) { frame->GetField(ID3FN_TEXT)->Set(text); tag->AttachFrame(frame); } } } return frame; }