summaryrefslogtreecommitdiff
path: root/plugins/gtkui/coverart.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-10-28 15:25:26 +0100
committerGravatar waker <wakeroid@gmail.com>2012-10-28 15:25:26 +0100
commit173c558fc4f18772b372b07c55d4ea07e252131b (patch)
tree766684deed3d814eb831b086b2a6659c5fff5c92 /plugins/gtkui/coverart.c
parent79aec07b7d75314c84f665a2b768267606ca34c0 (diff)
fixed cover loader bug which leads to infinite request chain when the image file can't be loaded
Diffstat (limited to 'plugins/gtkui/coverart.c')
-rw-r--r--plugins/gtkui/coverart.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/gtkui/coverart.c b/plugins/gtkui/coverart.c
index a2f1119a..f98957dc 100644
--- a/plugins/gtkui/coverart.c
+++ b/plugins/gtkui/coverart.c
@@ -148,24 +148,20 @@ loading_thread (void *none) {
if (stat (queue->fname, &stat_buf) < 0) {
trace ("failed to stat file %s\n", queue->fname);
}
- trace ("covercache: caching pixbuf for %s\n", queue->fname);
GdkPixbuf *pixbuf = NULL;
GError *error = NULL;
pixbuf = gdk_pixbuf_new_from_file_at_scale (queue->fname, queue->width, queue->width, TRUE, &error);
if (!pixbuf) {
unlink (queue->fname);
- fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", queue->fname, queue->width, error->message);
+ fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", queue->fname, queue->width, error ? error->message : "n/a");
if (error) {
g_error_free (error);
error = NULL;
}
const char *defpath = coverart_plugin->get_default_cover ();
- if (stat (defpath, &stat_buf) < 0) {
- trace ("failed to stat file %s\n", queue->fname);
- }
pixbuf = gdk_pixbuf_new_from_file_at_scale (defpath, queue->width, queue->width, TRUE, &error);
if (!pixbuf) {
- fprintf (stderr, "gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", defpath, queue->width, error->message);
+ fprintf (stderr, "default cover: gdk_pixbuf_new_from_file_at_scale %s %d failed, error: %s\n", defpath, queue->width, error->message);
}
}
if (error) {
@@ -192,7 +188,6 @@ loading_thread (void *none) {
queue->callback (queue->user_data);
}
queue_pop ();
- //g_idle_add (redraw_playlist_cb, NULL);
}
if (terminate) {
break;