From 0669d1e063ed591293fdfb46b64dc2f8bf197059 Mon Sep 17 00:00:00 2001 From: Martyn Russell Date: Tue, 25 Feb 2014 12:24:08 +0000 Subject: extract: Use a more logical ordered heuristic for caching strings --- libmediaart/extract.c | 9 +++++---- 1 file 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); -- cgit v1.2.1