From 3f774b4751339882682e3441c49dd0c5680aa819 Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Sat, 5 Jul 2008 21:34:57 +0200 Subject: [PATCH] Fixing dependency and remove commented code. --- configure.ac | 3 +- src/plugin.c | 96 ------------------------------------------------------------ 2 files changed, 2 insertions(+), 97 deletions(-) diff --git a/configure.ac b/configure.ac index 96bc5ba..6a79dcc 100644 --- a/configure.ac +++ b/configure.ac @@ -23,11 +23,12 @@ AC_PROG_LIBTOOL PKG_CHECK_MODULES([gmpccaa],[ glib-2.0 >= 2.4 gobject-2.0 >= 2.4 gtk+-2.0 >= 2.4 + glib-2.0 >= 2.16 gmodule-2.0 libxml-2.0 gthread-2.0 libmpd >= 0.14.99 - gmpc >= 0.15.4.102 + gmpc >= 0.15.6 ]) AC_SUBST(gmpccaa_LIBS) diff --git a/src/plugin.c b/src/plugin.c index cef377b..cb43b54 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -16,8 +16,6 @@ static void amazon_cover_art_pref_destroy(GtkWidget *container); static int fetch_cover_art(mpd_Song *song,int type, char **url); static int fetch_cover_priority(); -//static int shrink_string(gchar *string, int start, int end); - static int fetch_metadata(mpd_Song *song,MetaDataType type, char **path); static void amazon_set_enabled(int enabled); @@ -44,100 +42,6 @@ typedef struct amazon_song_info { }amazon_song_info; - -/* Convert string to the wonderful % notation for url*/ -/* -static char * __cover_art_process_string(const gchar *string) -{ -#define ACCEPTABLE(a) (((a) >= 'a' && (a) <= 'z') || ((a) >= 'A' && (a) <= 'Z') || ((a) >= '0' && (a) <= '9')) - - const gchar hex[16] = "0123456789ABCDEF"; - const gchar *p; - gchar *q; - gchar *result; - int c; - gint unacceptable = 0; - const gchar *tmp_p; - gchar *new_string; - int depth = 0; - int len; - int i = 0; - - len = strlen(string); - - new_string = g_malloc(len + 1); -*/ - /* Get count of chars that will need to be converted to % - and remove ([{}]) and everything between */ -/* for (p = string; *p != '\0'; p++) { - c = (guchar) *p; - - if(c == '(' || c == '[' || c == '{') { - depth++; - } else if(c == ')' || c == ']' || c == '}') { - depth--; - if(depth < 0) - depth = 0; - } else if(depth == 0) { - if (!ACCEPTABLE (c)) - unacceptable++; - - new_string[i] = c; - - i++; - } - } - - new_string[i] = '\0'; - - len = strlen(new_string); - -*/ /* remove double spaces from the string because removing ([{}]) - tends to create those */ -/* for(p = new_string + 1; *p != '\0'; p++) { - c = (guchar) *p; - if(c == ' ') { - tmp_p = p - 1; - if( *tmp_p == ' ') { - len = shrink_string(new_string, p - new_string, len); - p--; - } - } - } - -*/ /* make sure first char isn't a space */ -/* if(new_string[0] == ' ') - len = shrink_string(new_string, 0, len); -*/ - /* make sure there isn't a trailing space*/ -/* if(new_string[len - 1] == ' ') - len--; - - new_string[len] = '\0'; - - result = g_malloc (len + unacceptable * 2 + 1); - -*/ /*time to create the escaped string*/ -/* for (q = result, p = new_string; *p != '\0'; p++) - { - c = (guchar) *p; - - if (!ACCEPTABLE (c)) { - *q++ = '%'; // means hex coming - *q++ = hex[c >> 4]; - *q++ = hex[c & 15]; - } - else - *q++ = *p; - } - - *q = '\0'; - - g_free(new_string); - - return result; -} -*/ /** * Get Set enabled */ -- 2.11.4.GIT