#include "gmpc_easy_download.h"
+#define LOG_DOMAIN "MetaData"
int meta_num_plugins=0;
gmpcPluginParent **meta_plugins = NULL;
edited->artist = g_strdup_printf("%s %s", g_strstrip(str[1]), g_strstrip(str[0]));
}
g_strfreev(str);
- debug_printf(DEBUG_INFO, "string converted to: '%s'", edited->artist);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "string converted to: '%s'", edited->artist);
}
/**
process_queue = NULL;
}
- debug_printf(DEBUG_INFO,"Done..");
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG,"Done..");
/* Close the cover database */
TOC("test")
metadata_cache_destroy();
if(error){
/* Ok we failed to store it, now we cleanup, and try the next entry. */
- debug_printf(DEBUG_ERROR, "Failed to store file: %s: '%s'", filename, error->message);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Failed to store file: %s: '%s'", filename, error->message);
g_error_free(error); error = NULL;
}
else
- debug_printf(DEBUG_ERROR, "Failed to store file: %s: '%li'", gmpc_easy_handler_get_uri(handle),length);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Failed to store file: %s: '%i'", gmpc_easy_handler_get_uri(handle),(int)length);
/* If we fail, clean up and try next one */
g_free(filename);
}
/*
if (g_get_charset (&charset))
{
- debug_printf(DEBUG_INFO, "Locale is utf-8, just copying");
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Locale is utf-8, just copying");
dirname = g_strdup(song->artist);
}else{
- debug_printf(DEBUG_INFO, "Locale is %s converting to UTF-8", charset);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Locale is %s converting to UTF-8", charset);
dirname = g_convert_with_fallback (song->artist, -1,
charset, "UTF-8","-", NULL, NULL, &error);
}
}
//dirname = g_filename_from_utf8(song->artist,-1,NULL,NULL,&error);
if(error) {
- debug_printf(DEBUG_ERROR, "Failed to convert %s to file encoding. '%s'", song->artist, error->message);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Failed to convert %s to file encoding. '%s'", song->artist, error->message);
g_error_free(error);
if(dirname) g_free(dirname);
dirname = g_strdup("invalid");
if(path)
{
gint *indices = gtk_tree_path_get_indices(path);
- debug_printf(DEBUG_INFO,"Saving myself to position: %i\n", indices[0]);
cfg_set_single_value_as_int(config, "current-playlist","position",indices[0]);
gtk_tree_path_free(path);
}
if(path)
{
gint *indices = gtk_tree_path_get_indices(path);
- debug_printf(DEBUG_INFO,"Saving myself to position: %i\n", indices[0]);
cfg_set_single_value_as_int(config, "find2-browser","position",indices[0]);
gtk_tree_path_free(path);
}
mpd_database_playlist_list_delete(connection, pl_path,pos[0]);
}
}
- debug_printf(DEBUG_INFO,"ping\n");
g_list_foreach (list,(GFunc) gtk_tree_path_free, NULL);
g_list_free (list);
if(path)
{
gint *indices = gtk_tree_path_get_indices(path);
- debug_printf(DEBUG_INFO,"Saving myself to position: %i\n", indices[0]);
cfg_set_single_value_as_int(config, "playlist-plugin","position",indices[0]);
gtk_tree_path_free(path);
}
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#include <libmpd/debug_printf.h>
#include "main.h"
#include "misc.h"
#include "gmpc-mpddata-treeview.h"
#include "playlist3-playlist-editor.h"
#include "gmpc-extras.h"
+#define LOG_DOMAIN "TagBrowser"
/**
* dirty hack to workaround single parameter for now
*/
{
gint *indices = gtk_tree_path_get_indices(path);
gchar *group = g_strdup_printf("tag2-plugin:%s",tb->key);
- debug_printf(DEBUG_INFO,"Saving myself to position: %i\n", indices[0]);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG,"Saving myself to position: %i\n", indices[0]);
cfg_set_single_value_as_int(config, group,"position",indices[0]);
gtk_tree_path_free(path);
g_free(group);
/* destroy dialog */
gtk_widget_destroy(dialog);
- debug_printf(DEBUG_INFO,"Close dialog: %i %i",width,height);
}
static void serverstats_connection_changed(MpdObj *mi, int connect,void *usedata)
%ht{
#include <gtk/gtk.h>
#include <libmpd/libmpd.h>
-#include <libmpd/debug_printf.h>
#include "metadata.h"
%}
} ;
%}
+%{
+#define LOG_DOMAIN "MpdData.Model"
+%}
+
class Gmpc:MpdData:Model from G:Object
(interface Gtk:Tree:Sortable)
(interface Gtk:Tree:Model)
self->_priv->data = NULL;
if(self->num_rows != 0)
- debug_printf(DEBUG_ERROR,"not every row cleared %i\n",self->num_rows);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_WARNING,"not every row cleared %i\n",self->num_rows);
self->num_rows =0;
/* Free possible stored images */
if(self->_priv->images && self->_priv->use_images)
};
static GList *paste_queue = NULL;
+
+#define LOG_DOMAIN "MpdData.TreeView"
%}
class Gmpc:MpdData:Treeview from Gtk:Tree:View {
MPDDATA_MODEL_ROW_TYPE,&type,
MPDDATA_MODEL_COL_PATH, &path,
-1);
- debug_printf(DEBUG_INFO, "Copying song, into queue: %s\n", path);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Copying song, into queue: %s\n", path);
if(type == MPD_DATA_TYPE_SONG) {
paste_queue = g_list_prepend(paste_queue, path);
} else if (type == MPD_DATA_TYPE_DIRECTORY) {
Profile *prof = self_get_profile(self, id);
if(!prof)
{
- g_log(LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Trying to remove not-existing profile: %i\n", id);
+ g_log(LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Trying to remove not-existing profile: %s\n", id);
return;
}
/* Generate removal message before the actual profile is destroyed */
#include "bug-information.h"
#include "Widgets/pixbuf-cache.h"
+#include <libmpd/debug_printf.h>
#define LOG_DOMAIN "Gmpc"
/**
#include "config-defaults.h"
#include <libmpd/libmpd.h>
#include <libmpd/libmpdclient.h>
-#include <libmpd/debug_printf.h>
#include "config1.h"
#include "plugin.h"
#include "plugin-internal.h"