diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | plugins/leoslyrics/lyrics_leoslyrics.c | 7 | ||||
-rw-r--r-- | src/lyrics_leoslyrics.c | 9 |
4 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,5 @@ +2007-06-17 Andreas Obergrusberger <tradiaz@yahoo.de> + * two critical bugs in leoslyrics source have been fixed 2007-02-16 Andreas Obergrusberger <tradiaz@yahoo.de> + nj has posted a lot of patches on the bug tracker * added the option to search for artist and title at the same time diff --git a/configure.ac b/configure.ac index d24c4a558..3ffc87009 100644 --- a/configure.ac +++ b/configure.ac @@ -449,3 +449,4 @@ AC_CONFIG_FILES([Makefile src/Makefile plugins/Makefile doc/Makefile po/Makefile plugins/hd/Makefile plugins/leoslyrics/Makefile]) AC_OUTPUT +AC_MSG_WARN([TO BUILD AN INSTALL THE PLUGINS cd TO THE plugins DIRECTORY AND EXECUTE make && make install THERE]) diff --git a/plugins/leoslyrics/lyrics_leoslyrics.c b/plugins/leoslyrics/lyrics_leoslyrics.c index a62e47f05..5bcb32242 100644 --- a/plugins/leoslyrics/lyrics_leoslyrics.c +++ b/plugins/leoslyrics/lyrics_leoslyrics.c @@ -50,7 +50,7 @@ static void check_search_response(void *data, const char *name, { if(strstr(atts[2], "hid") != NULL) { - hid = atts[3]; + hid = strdup (atts[3]); } if(strstr(atts[2], "exactMatch") != NULL) @@ -120,6 +120,11 @@ int check_lyr_leoslyrics(char *artist, char *title, char *url) XML_ParserFree(parser); if(!(result & 4)) return -1; //check whether lyrics found + + CURL *curl = curl_easy_init (); + char *esc_hid = curl_easy_escape (curl, hid, 0); + free (hid); + snprintf(url, 512, LEOSLYRICS_CONTENT_URL, hid); return 0; diff --git a/src/lyrics_leoslyrics.c b/src/lyrics_leoslyrics.c index 3b85e68d3..4afb3fa7b 100644 --- a/src/lyrics_leoslyrics.c +++ b/src/lyrics_leoslyrics.c @@ -50,7 +50,7 @@ static void check_search_response(void *data, const char *name, { if(strstr(atts[2], "hid") != NULL) { - hid = atts[3]; + hid = strdup (atts[3]); } if(strstr(atts[2], "exactMatch") != NULL) @@ -120,7 +120,12 @@ int check_lyr_leoslyrics(char *artist, char *title, char *url) XML_ParserFree(parser); if(!(result & 4)) return -1; //check whether lyrics found - snprintf(url, 512, LEOSLYRICS_CONTENT_URL, hid); + + CURL *curl = curl_easy_init (); + char *esc_hid = curl_easy_escape (curl, hid, 0); + free (hid); + + snprintf(url, 512, LEOSLYRICS_CONTENT_URL, esc_hid); return 0; } |