Blob Blame History Raw
diff -Nur audacious-2.4-rc1-orig/src/audacious/ui_albumart.c audacious-2.4-rc1/src/audacious/ui_albumart.c
--- audacious-2.4-rc1-orig/src/audacious/ui_albumart.c	2010-08-10 17:41:57.000000000 +0200
+++ audacious-2.4-rc1/src/audacious/ui_albumart.c	2010-08-13 21:56:56.000000000 +0200
@@ -194,11 +194,23 @@
 
 gchar * get_associated_image_file (const gchar * filename)
 {
-    gchar * path = g_path_get_dirname (filename);
-    gchar * base = g_path_get_basename (filename);
-    gchar * image_file = fileinfo_recursive_get_image (path, base, 0);
+    gchar *fn, *path, *base, *image_file;
+
+    if (str_has_prefix_nocase(filename,"file://")) {
+        fn = g_filename_from_uri(filename,NULL,NULL);
+    }
+    else {
+        fn = g_strdup(filename);
+    }
+    if (!fn) {
+        return NULL;
+    }
+    path = g_path_get_dirname (fn);
+    base = g_path_get_basename (fn);
+    image_file = fileinfo_recursive_get_image (path, base, 0);
 
     g_free (path);
     g_free (base);
+    g_free (fn);
     return image_file;
 }