add to libmpdclient support for getting list of any tag type

This commit is contained in:
unK
2008-10-05 19:30:42 +02:00
parent f8727b0a10
commit 9fd373625d
5 changed files with 62 additions and 16 deletions

View File

@@ -628,6 +628,21 @@ void MPDConnection::GetPlaylists(TagList &v) const
}
}
void MPDConnection::GetList(TagList &v, mpd_TagItems type) const
{
if (isConnected)
{
mpd_sendListCommand(itsConnection, type, NULL);
char *item;
while ((item = mpd_getNextTag(itsConnection, type)) != NULL)
{
v.push_back(item);
delete [] item;
}
mpd_finishCommand(itsConnection);
}
}
void MPDConnection::GetArtists(TagList &v) const
{
if (isConnected)