本文整理汇总了C++中CMusicInfoTag::SetMusicBrainzAlbumArtistHints方法的典型用法代码示例。如果您正苦于以下问题:C++ CMusicInfoTag::SetMusicBrainzAlbumArtistHints方法的具体用法?C++ CMusicInfoTag::SetMusicBrainzAlbumArtistHints怎么用?C++ CMusicInfoTag::SetMusicBrainzAlbumArtistHints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMusicInfoTag
的用法示例。
在下文中一共展示了CMusicInfoTag::SetMusicBrainzAlbumArtistHints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetAlbumArtistHints
void CTagLoaderTagLib::SetAlbumArtistHints(CMusicInfoTag &tag, const std::vector<std::string> &values)
{
if (values.size() == 1)
tag.SetMusicBrainzAlbumArtistHints(StringUtils::Split(values[0], g_advancedSettings.m_musicItemSeparator));
else
tag.SetMusicBrainzAlbumArtistHints(values);
}
示例2: ParseTag
bool CTagLoaderTagLib::ParseTag(MP4::Tag *mp4, EmbeddedArt *art, CMusicInfoTag& tag)
{
if (!mp4)
return false;
ReplayGain replayGainInfo;
MP4::ItemListMap& itemListMap = mp4->itemListMap();
for (MP4::ItemListMap::ConstIterator it = itemListMap.begin(); it != itemListMap.end(); ++it)
{
if (it->first == "\251nam")
tag.SetTitle(it->second.toStringList().front().to8Bit(true));
else if (it->first == "\251ART")
SetArtist(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:ARTISTS")
tag.SetMusicBrainzArtistHints(StringListToVectorString(it->second.toStringList()));
else if (it->first == "\251alb")
tag.SetAlbum(it->second.toStringList().front().to8Bit(true));
else if (it->first == "aART")
SetAlbumArtist(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:ALBUMARTISTS")
tag.SetMusicBrainzAlbumArtistHints(StringListToVectorString(it->second.toStringList()));
else if (it->first == "\251gen")
SetGenre(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "\251cmt")
tag.SetComment(it->second.toStringList().front().to8Bit(true));
else if (it->first == "cpil")
tag.SetCompilation(it->second.toBool());
else if (it->first == "trkn")
tag.SetTrackNumber(it->second.toIntPair().first);
else if (it->first == "disk")
tag.SetDiscNumber(it->second.toIntPair().first);
else if (it->first == "\251day")
tag.SetYear(it->second.toStringList().front().toInt());
else if (it->first == "----:com.apple.iTunes:replaygain_track_gain")
replayGainInfo.ParseGain(ReplayGain::TRACK, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:replaygain_album_gain")
replayGainInfo.ParseGain(ReplayGain::ALBUM, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:replaygain_track_peak")
replayGainInfo.ParsePeak(ReplayGain::TRACK, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:replaygain_album_peak")
replayGainInfo.ParsePeak(ReplayGain::ALBUM, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:MusicBrainz Artist Id")
tag.SetMusicBrainzArtistID(SplitMBID(StringListToVectorString(it->second.toStringList())));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Artist Id")
tag.SetMusicBrainzAlbumArtistID(SplitMBID(StringListToVectorString(it->second.toStringList())));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Artist")
SetAlbumArtist(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Id")
tag.SetMusicBrainzAlbumID(it->second.toStringList().front().to8Bit(true));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Track Id")
tag.SetMusicBrainzTrackID(it->second.toStringList().front().to8Bit(true));
else if (it->first == "covr")
{
MP4::CoverArtList coverArtList = it->second.toCoverArtList();
for (MP4::CoverArtList::ConstIterator pt = coverArtList.begin(); pt != coverArtList.end(); ++pt)
{
std::string mime;
switch (pt->format())
{
case MP4::CoverArt::PNG:
mime = "image/png";
break;
case MP4::CoverArt::JPEG:
mime = "image/jpeg";
break;
default:
break;
}
if (mime.empty())
continue;
tag.SetCoverArtInfo(pt->data().size(), mime);
if (art)
art->set((const uint8_t *)pt->data().data(), pt->data().size(), mime);
break; // one is enough
}
}
}
if (mp4->comment() != String::null)
tag.SetComment(mp4->comment().toCString(true));
tag.SetReplayGain(replayGainInfo);
return true;
}