add support for album artist tag

This commit is contained in:
Andrzej Rybczak
2010-01-23 20:04:02 +01:00
parent df15fe2bf4
commit 4ed9493abd
10 changed files with 114 additions and 53 deletions

View File

@@ -190,6 +190,11 @@ std::string MPD::Song::GetAlbum(unsigned pos) const
return GetTag(MPD_TAG_ALBUM, pos);
}
std::string MPD::Song::GetAlbumArtist(unsigned pos) const
{
return GetTag(MPD_TAG_ALBUM_ARTIST, pos);
}
std::string MPD::Song::GetTrack(unsigned pos) const
{
std::string track = GetTag(MPD_TAG_TRACK, pos);
@@ -263,6 +268,11 @@ void MPD::Song::SetAlbum(const std::string &str, unsigned pos)
SetTag(MPD_TAG_ALBUM, pos, str);
}
void MPD::Song::SetAlbumArtist(const std::string &str, unsigned pos)
{
SetTag(MPD_TAG_ALBUM_ARTIST, pos, str);
}
void MPD::Song::SetTrack(const std::string &str, unsigned pos)
{
SetTag(MPD_TAG_TRACK, pos, str);
@@ -374,6 +384,9 @@ std::string MPD::Song::ParseFormat(std::string::const_iterator &it, const char *
case 'a':
get = &MPD::Song::GetArtist;
break;
case 'A':
get = &MPD::Song::GetAlbumArtist;
break;
case 'b':
get = &MPD::Song::GetAlbum;
break;