30 #if defined HAVE_CONFIG_H
86 size_t numRemoved = 0;
89 while ((frame = tag.
Find(
id)) !=
NULL)
113 frame->GetField(
ID3FN_TEXT)->Set(text.c_str());
144 size_t numRemoved = 0;
147 while ((frame = hasArtist(tag)) !=
NULL)
243 String id3::v2::getV1Comment(
const ID3_TagImpl& tag)
252 String id3::v2::getComment(
const ID3_TagImpl& tag, String desc)
261 ID3D_NOTICE(
"id3::v2::setComment: trying to find frame with description = " << desc );
276 ID3D_NOTICE(
"id3::v2::setComment: found frame with description = " << desc );
284 ID3D_NOTICE(
"id3::v2::setComment: creating new comment frame" );
290 ID3D_WARNING(
"id3::v2::setComment: ack! no frame" );
296 frame->GetField(
ID3FN_TEXT)->Set(text.c_str());
303 size_t id3::v2::removeAllComments(
ID3_TagImpl& tag)
309 size_t id3::v2::removeComments(
ID3_TagImpl& tag, String desc)
311 size_t numRemoved = 0;
350 size_t id3::v2::getTrackNum(
const ID3_TagImpl& tag)
352 String sTrack = getTrack(tag);
353 return ::atoi(sTrack.c_str());
359 String track = toString((
size_t)trk);
363 track += toString((
size_t)ttl);
388 size_t id3::v2::getGenreNum(
const ID3_TagImpl& tag)
390 String sGenre = getGenre(tag);
391 size_t ulGenre = 0xFF;
392 size_t size = sGenre.size();
397 if (i < size && size && sGenre[i] ==
'(')
400 while (i < size && isdigit(sGenre[i]))
404 if (i < size && sGenre[i] ==
')')
407 ulGenre = min(0xFF, atoi(&sGenre[1]));
417 sGenre += toString(genre) +
")";
468 frame->GetField(
ID3FN_TEXT)->Set(text.c_str());
478 String id3::v2::getLyricist(
const ID3_TagImpl& tag)
522 frame->GetField(
ID3FN_DATA)->Set(data.data(), data.size());
527 BString id3::v2::getSyncLyrics(
const ID3_TagImpl& tag, String lang, String desc)
537 return BString(
reinterpret_cast<const BString::value_type *
>(fld->
GetRawBinary()), fld->
Size());