From 9bf1cf34cac6336f2a444be454f3b2d225afa644 Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Sun, 27 Jul 2008 18:06:24 +0200 Subject: [PATCH] Remove printf and cleanup --- src/plugin.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/plugin.c b/src/plugin.c index cb43b54..19790a9 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -11,15 +11,7 @@ static char * host = "http://ecs.amazonaws.%s/onca/xml?Service=AWSECommerceService&Operation=ItemSearch&SearchIndex=Music&ResponseGroup=Images,EditorialReview&AWSAccessKeyId=%s&%s=%s&%s=%s"; -static void amazon_cover_art_pref_construct(GtkWidget *container); -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 fetch_metadata(mpd_Song *song,MetaDataType type, char **path); - -static void amazon_set_enabled(int enabled); -static int amazon_get_enabled(); #define ENDPOINTS 6 static char *endpoints[ENDPOINTS][2] = @@ -54,9 +46,11 @@ static void amazon_set_enabled(int enabled) cfg_set_single_value_as_int(config, "cover-amazon", "enable", enabled); } +/** + * Get priority + */ static int fetch_cover_priority(){ return cfg_get_single_value_as_int_with_default(config, "cover-amazon", "priority", 80); - } static int fetch_metadata(mpd_Song *song,MetaDataType type, char **path) @@ -170,7 +164,6 @@ static int __fetch_metadata_amazon(char *sfield, char *nartist, char *stype,char debug_printf(DEBUG_INFO, "search-type: %s\n", stype); snprintf(furl,1024, host,endp, AMAZONKEY,sfield, nartist, stype, nalbum); - printf("amazon url: '%s'\n", furl); if(gmpc_easy_download(furl, &data)) { amazon_song_info *asi = __cover_art_xml_get_image(data.data, data.size); @@ -285,7 +278,7 @@ static int fetch_cover_art(mpd_Song *song,int type, char **url) static void amazon_cover_art_enable_toggle(GtkWidget *wid) { int kk = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid)); - amazon_set_enabled(kk); + amazon_set_enabled(kk); } static void amazon_cover_art_pref_destroy(GtkWidget *container) { -- 2.11.4.GIT