[libmediaart/api-cleanup: 9/11] extract: Use a more logical ordered heuristic for caching strings
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libmediaart/api-cleanup: 9/11] extract: Use a more logical ordered heuristic for caching strings
- Date: Tue, 25 Feb 2014 13:53:48 +0000 (UTC)
commit 36d59330e85571fb660c9f85fb9043b37848a0ef
Author: Martyn Russell <martyn lanedo com>
Date: Tue Feb 25 12:24:08 2014 +0000
extract: Use a more logical ordered heuristic for caching strings
libmediaart/extract.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/libmediaart/extract.c b/libmediaart/extract.c
index c421678..354bb59 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]