diff --git a/doc/config b/doc/config index a8edceff..6970df08 100644 --- a/doc/config +++ b/doc/config @@ -389,6 +389,7 @@ ## supported lyrics databases: ## ## - 1 - lyrc.com.ar +## - 2 - lyricsfly.com ## # #lyrics_database = "1" diff --git a/src/lyrics.cpp b/src/lyrics.cpp index 11c86f13..eacc20f0 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -261,6 +261,8 @@ void *Lyrics::Get(void *screen_void_ptr) pthread_exit(0); } + if (my_lyrics == &Lyricsfly) + Replace(result, "[br]", ""); Replace(result, "<", "<"); Replace(result, ">", ">"); @@ -337,12 +339,13 @@ void Lyrics::Take() } #endif // HAVE_PTHREAD_H -const unsigned Lyrics::DBs = 1; // number of currently supported lyrics databases +const unsigned Lyrics::DBs = 2; // number of currently supported lyrics databases const char *Lyrics::PluginsList[] = { //"lyricsplugin.com", "lyrc.com.ar", + "lyricsfly.com", 0 }; @@ -369,7 +372,7 @@ const Lyrics::Plugin Lyrics::LyricsPlugin = LyricsPlugin_NotFound };*/ -bool Lyrics::LyrcComAr_NotFound(const std::string &s) +bool Lyrics::Generic_NotFound(const std::string &s) { // it should never fail as open_tag and close_tag // are not present if lyrics are not found @@ -381,7 +384,15 @@ const Lyrics::Plugin Lyrics::LyrcComAr = "http://lyrc.com.ar/tema1es.php?artist=%artist%&songname=%title%", "", "
",
- LyrcComAr_NotFound
+ Generic_NotFound
+};
+
+const Lyrics::Plugin Lyrics::Lyricsfly =
+{
+ "http://api.lyricsfly.com/api/api.php?i=30002e18b71fbe4f0-temporary.API.access&a=%artist%&t=%title%",
+ "