support for switching between supported lyrics databases at runtime

This commit is contained in:
Andrzej Rybczak
2009-02-02 23:43:12 +01:00
parent baa1c9bf4f
commit b1817a0bc9
7 changed files with 37 additions and 4 deletions

View File

@@ -285,13 +285,20 @@ namespace
lyricsplugin_not_found
};
const char *lyricsplugins_list[] =
{
"lyricwiki.org",
"lyricsplugin.com",
0
};
const LyricsPlugin *ChooseLyricsPlugin(int i)
{
switch (i)
{
case 1:
case 0:
return &lyricwiki;
case 2:
case 1:
return &lyricsplugin;
default:
return &lyricwiki;
@@ -299,6 +306,11 @@ namespace
}
}
const char *GetLyricsPluginName(int offset)
{
return lyricsplugins_list[offset];
}
#endif // HAVE_CURL_CURL_H
void *GetLyrics(void *song)