summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2014-02-25 12:24:08 +0000
committerMartyn Russell <martyn@lanedo.com>2014-06-23 05:31:45 +0100
commit0669d1e063ed591293fdfb46b64dc2f8bf197059 (patch)
tree5687f138502990f83f53fc0f48f05aa302b1eb25
parenta3b64fe256ad5f1761923471b2335fb945e710de (diff)
downloadlibmediaart-0669d1e063ed591293fdfb46b64dc2f8bf197059.tar.gz
extract: Use a more logical ordered heuristic for caching strings
-rw-r--r--libmediaart/extract.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libmediaart/extract.c b/libmediaart/extract.c
index 1764e19..bd60c98 100644
--- a/libmediaart/extract.c
+++ b/libmediaart/extract.c
@@ -1380,11 +1380,12 @@ get_heuristic_for_parent_path (GFile *file,
g_object_unref (parent);
}
- key = g_strdup_printf ("%i-%s-%s-%s",
- type,
+ /* Just used for caching in our hash table */
+ key = g_strdup_printf ("%s:%s:%s:%s",
+ parent_path ? parent_path : "",
+ media_art_type_name[type],
artist ? artist : "",
- title ? title : "",
- parent_path ? parent_path : "");
+ title ? title : "");
g_free (parent_path);