tracker r2812 - in trunk: . src/tracker-extract utils/services
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2812 - in trunk: . src/tracker-extract utils/services
- Date: Wed, 21 Jan 2009 08:56:55 +0000 (UTC)
Author: pvanhoof
Date: Wed Jan 21 08:56:54 2009
New Revision: 2812
URL: http://svn.gnome.org/viewvc/tracker?rev=2812&view=rev
Log:
2009-01-21 Philip Van Hoof <philip codeminded be>
* src/tracker-extract/tracker-albumart.c: Correction for album-art
that has one-character long album-names.
* utils/services/service2rdf-xml.py: Bugfix
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/tracker-albumart.c
trunk/utils/services/service2rdf-xml.py
Modified: trunk/src/tracker-extract/tracker-albumart.c
==============================================================================
--- trunk/src/tracker-extract/tracker-albumart.c (original)
+++ trunk/src/tracker-extract/tracker-albumart.c Wed Jan 21 08:56:54 2009
@@ -60,6 +60,25 @@
gchar **path,
gchar **local);
+static gchar *
+my_compute_checksum_for_data (GChecksumType checksum_type,
+ const guchar *data,
+ gsize length)
+{
+ GChecksum *checksum;
+ gchar *retval;
+
+ checksum = g_checksum_new (checksum_type);
+ if (!checksum)
+ return NULL;
+
+ g_checksum_update (checksum, data, length);
+ retval = g_strdup (g_checksum_get_string (checksum));
+ g_checksum_free (checksum);
+
+ return retval;
+}
+
#ifndef HAVE_STRCASESTR
static gchar *
@@ -566,17 +585,13 @@
return;
}
- if (!a || *a == '\0')
- f_a = g_strdup (" ");
- else if (strlen (a) == 1)
- f_a = g_strconcat (a, " ", NULL);
+ if (!a)
+ f_a = g_strdup (" ");
else
f_a = strip_characters (a);
- if (!b || *b == '\0')
- f_b = g_strdup (" ");
- else if (strlen (b) == 1)
- f_b = g_strconcat (b, " ", NULL);
+ if (!b)
+ f_b = g_strdup (" ");
else
f_b = strip_characters (b);
@@ -592,8 +607,8 @@
g_mkdir_with_parents (dir, 0770);
}
- str1 = g_compute_checksum_for_string (G_CHECKSUM_MD5, down1, -1);
- str2 = g_compute_checksum_for_string (G_CHECKSUM_MD5, down2, -1);
+ str1 = my_compute_checksum_for_data (G_CHECKSUM_MD5, (const guchar *) down1, strlen (down1));
+ str2 = my_compute_checksum_for_data (G_CHECKSUM_MD5, (const guchar *) down2, strlen (down2));
g_free (down1);
g_free (down2);
Modified: trunk/utils/services/service2rdf-xml.py
==============================================================================
--- trunk/utils/services/service2rdf-xml.py (original)
+++ trunk/utils/services/service2rdf-xml.py Wed Jan 21 08:56:54 2009
@@ -73,7 +73,7 @@
print "\t\t<rdfs:subClassOf>"
print "\t\t\t<rdfs:Class rdf:about=\"" + uri + "/" +vvsplit[0] + "#" + vvsplit[1] + "\"/>"
print "\t\t</rdfs:subClassOf>"
- print "\t</rdf:Class>"
+ print "\t</rdfs:Class>"
for mdata in metadata.sections():
splitted = mdata.split (":")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]