replace lyricsplugin.com with lyrc.com.ar as the former no longer works
this is sorta workaround, I need to add at least leolyrics and lyricsfly databases support, but they require unique user ids. btw, plugin system in its current form is horrible mess and it *really* needs to be redesigned.
This commit is contained in:
@@ -388,7 +388,7 @@
|
|||||||
##
|
##
|
||||||
## supported lyrics databases:
|
## supported lyrics databases:
|
||||||
##
|
##
|
||||||
## - 1 - lyricsplugin.com
|
## - 1 - lyrc.com.ar
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
#lyrics_database = "1"
|
#lyrics_database = "1"
|
||||||
|
|||||||
@@ -341,7 +341,8 @@ const unsigned Lyrics::DBs = 1; // number of currently supported lyrics database
|
|||||||
|
|
||||||
const char *Lyrics::PluginsList[] =
|
const char *Lyrics::PluginsList[] =
|
||||||
{
|
{
|
||||||
"lyricsplugin.com",
|
//"lyricsplugin.com",
|
||||||
|
"lyrc.com.ar",
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -350,7 +351,7 @@ const char *Lyrics::GetPluginName(int offset)
|
|||||||
return PluginsList[offset];
|
return PluginsList[offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Lyrics::LyricsPlugin_NotFound(const std::string &s)
|
/*bool Lyrics::LyricsPlugin_NotFound(const std::string &s)
|
||||||
{
|
{
|
||||||
if (s.empty())
|
if (s.empty())
|
||||||
return true;
|
return true;
|
||||||
@@ -366,6 +367,21 @@ const Lyrics::Plugin Lyrics::LyricsPlugin =
|
|||||||
"<div id=\"lyrics\">",
|
"<div id=\"lyrics\">",
|
||||||
"</div>",
|
"</div>",
|
||||||
LyricsPlugin_NotFound
|
LyricsPlugin_NotFound
|
||||||
|
};*/
|
||||||
|
|
||||||
|
bool Lyrics::LyrcComAr_NotFound(const std::string &s)
|
||||||
|
{
|
||||||
|
// it should never fail as open_tag and close_tag
|
||||||
|
// are not present if lyrics are not found
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Lyrics::Plugin Lyrics::LyrcComAr =
|
||||||
|
{
|
||||||
|
"http://lyrc.com.ar/tema1es.php?artist=%artist%&songname=%title%",
|
||||||
|
"</table>",
|
||||||
|
"<p>",
|
||||||
|
LyrcComAr_NotFound
|
||||||
};
|
};
|
||||||
|
|
||||||
const Lyrics::Plugin *Lyrics::ChoosePlugin(int i)
|
const Lyrics::Plugin *Lyrics::ChoosePlugin(int i)
|
||||||
@@ -373,9 +389,10 @@ const Lyrics::Plugin *Lyrics::ChoosePlugin(int i)
|
|||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return &LyricsPlugin;
|
//return &LyricsPlugin;
|
||||||
|
return &LyrcComAr;
|
||||||
default:
|
default:
|
||||||
return &LyricsPlugin;
|
return &LyrcComAr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ class Lyrics : public Screen<Scrollpad>
|
|||||||
# endif // HAVE_PTHREAD_H
|
# endif // HAVE_PTHREAD_H
|
||||||
|
|
||||||
static const Plugin *ChoosePlugin(int);
|
static const Plugin *ChoosePlugin(int);
|
||||||
static bool LyricsPlugin_NotFound(const std::string &);
|
//static bool LyricsPlugin_NotFound(const std::string &);
|
||||||
|
static bool LyrcComAr_NotFound(const std::string &);
|
||||||
|
|
||||||
static bool Ready;
|
static bool Ready;
|
||||||
|
|
||||||
@@ -93,7 +94,8 @@ class Lyrics : public Screen<Scrollpad>
|
|||||||
# endif // HAVE_PTHREAD_H
|
# endif // HAVE_PTHREAD_H
|
||||||
|
|
||||||
static const char *PluginsList[];
|
static const char *PluginsList[];
|
||||||
static const Plugin LyricsPlugin;
|
//static const Plugin LyricsPlugin;
|
||||||
|
static const Plugin LyrcComAr;
|
||||||
# endif // HAVE_CURL_CURL_H
|
# endif // HAVE_CURL_CURL_H
|
||||||
|
|
||||||
size_t itsScrollBegin;
|
size_t itsScrollBegin;
|
||||||
|
|||||||
Reference in New Issue
Block a user