tracker r3002 - in trunk: . src/tracker-extract tests/tracker-extract
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r3002 - in trunk: . src/tracker-extract tests/tracker-extract
- Date: Tue, 3 Mar 2009 09:46:42 +0000 (UTC)
Author: mr
Date: Tue Mar 3 09:46:42 2009
New Revision: 3002
URL: http://svn.gnome.org/viewvc/tracker?rev=3002&view=rev
Log:
* src/tracker-extract/tracker-escape.c:
* src/tracker-extract/tracker-extract-gstreamer-playbin.c:
* src/tracker-extract/tracker-extract-gstreamer.c:
* src/tracker-extract/tracker-extract-jpeg.c:
* src/tracker-extract/tracker-extract-mp3.c:
* src/tracker-extract/tracker-extract.c:
* tests/tracker-extract/tracker-extract-test-utils.c: Don't use
g_strstrip() before calling tracker_escape_metadata() which calls
g_strstrip() for us.
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/tracker-escape.c
trunk/src/tracker-extract/tracker-extract-gstreamer-playbin.c
trunk/src/tracker-extract/tracker-extract-gstreamer.c
trunk/src/tracker-extract/tracker-extract-jpeg.c
trunk/src/tracker-extract/tracker-extract-mp3.c
trunk/src/tracker-extract/tracker-extract.c
trunk/tests/tracker-extract/tracker-extract-test-utils.c
Modified: trunk/src/tracker-extract/tracker-escape.c
==============================================================================
--- trunk/src/tracker-extract/tracker-escape.c (original)
+++ trunk/src/tracker-extract/tracker-escape.c Tue Mar 3 09:46:42 2009
@@ -36,10 +36,10 @@
g_debug ("string:%s", str);
if (g_utf8_validate (str, -1, &end)) {
- return g_strstrip(g_strdup (str));
+ return g_strstrip (g_strdup (str));
}
- return g_strstrip(g_strndup (str, end - str));
+ return g_strstrip (g_strndup (str, end - str));
}
gchar *
Modified: trunk/src/tracker-extract/tracker-extract-gstreamer-playbin.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-gstreamer-playbin.c (original)
+++ trunk/src/tracker-extract/tracker-extract-gstreamer-playbin.c Tue Mar 3 09:46:42 2009
@@ -912,7 +912,6 @@
g_free (basename);
title = g_strdelimit (title, "_", ' ');
- title = g_strstrip (title);
g_hash_table_insert (metadata,
g_strdup ("Audio:Title"),
@@ -959,7 +958,6 @@
g_free (basename);
title = g_strdelimit (title, "_", ' ');
- title = g_strstrip (title);
g_hash_table_insert (metadata,
g_strdup ("Video:Title"),
Modified: trunk/src/tracker-extract/tracker-extract-gstreamer.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-gstreamer.c (original)
+++ trunk/src/tracker-extract/tracker-extract-gstreamer.c Tue Mar 3 09:46:42 2009
@@ -702,7 +702,6 @@
g_free (basename);
title = g_strdelimit (title, "_", ' ');
- title = g_strstrip (title);
g_hash_table_insert (metadata,
g_strdup ("Video:Title"),
@@ -719,7 +718,6 @@
g_free (basename);
title = g_strdelimit (title, "_", ' ');
- title = g_strstrip (title);
g_hash_table_insert (metadata,
g_strdup ("Audio:Title"),
Modified: trunk/src/tracker-extract/tracker-extract-jpeg.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-jpeg.c (original)
+++ trunk/src/tracker-extract/tracker-extract-jpeg.c Tue Mar 3 09:46:42 2009
@@ -174,7 +174,7 @@
new_fn[0] = new_fn[1] = ' ';
}
- return g_strstrip(new_fn);
+ return g_strstrip (new_fn);
}
static gchar *
Modified: trunk/src/tracker-extract/tracker-extract-mp3.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-mp3.c (original)
+++ trunk/src/tracker-extract/tracker-extract-mp3.c Tue Mar 3 09:46:42 2009
@@ -1503,16 +1503,15 @@
/* Check that we have the minimum data. FIXME We should not need to do this */
if (!g_hash_table_lookup (metadata, "Audio:Title")) {
- gchar *basenam = g_filename_display_basename(filename);
- gchar **parts = g_strsplit (basenam, ".", -1);
- gchar *title = g_strdup(parts[0]);
+ gchar *basename = g_filename_display_basename (filename);
+ gchar **parts = g_strsplit (basename, ".", -1);
+ gchar *title = g_strdup (parts[0]);
g_strfreev (parts);
- g_free (basenam);
+ g_free (basename);
title = g_strdelimit (title, "_", ' ');
- title = g_strstrip (title);
-
+
g_hash_table_insert (metadata,
g_strdup ("Audio:Title"),
tracker_escape_metadata (title));
Modified: trunk/src/tracker-extract/tracker-extract.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract.c (original)
+++ trunk/src/tracker-extract/tracker-extract.c Tue Mar 3 09:46:42 2009
@@ -181,7 +181,6 @@
value_utf8 = g_locale_to_utf8 (value, -1, NULL, NULL, NULL);
if (value_utf8) {
- value_utf8 = g_strstrip (value_utf8);
tracker_dbus_request_debug (GPOINTER_TO_UINT (user_data),
" Found '%s'='%s'",
key,
Modified: trunk/tests/tracker-extract/tracker-extract-test-utils.c
==============================================================================
--- trunk/tests/tracker-extract/tracker-extract-test-utils.c (original)
+++ trunk/tests/tracker-extract/tracker-extract-test-utils.c Tue Mar 3 09:46:42 2009
@@ -271,7 +271,6 @@
value_utf8 = g_locale_to_utf8 (value, -1, NULL, NULL, NULL);
if (value_utf8) {
- value_utf8 = g_strstrip (value_utf8);
g_print ("%s=%s;\n", (gchar*) key, value_utf8);
g_free (value_utf8);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]