[tracker] tracker-extract-mp3: Strip whitespace from ID3v2 tags



commit e2128e513fc8f70309ebae145c00e7d574a50c1c
Author: Jürg Billeter <j bitron ch>
Date:   Thu May 7 11:14:49 2009 +0200

    tracker-extract-mp3: Strip whitespace from ID3v2 tags
---
 src/tracker-extract/tracker-extract-mp3.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index f3f2fc4..fb26efd 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -857,6 +857,8 @@ get_id3v24_tags (const gchar *data,
 				csize--;
 
 				if (!tracker_is_empty_string (word)) {       
+					g_strstrip (word);
+
 					if (strcmp (tmap[i].text, "TRCK") == 0) {
 						gchar **parts;
 
@@ -962,6 +964,8 @@ get_id3v24_tags (const gchar *data,
 			}
 
 			if (!tracker_is_empty_string (word)) {
+				g_strstrip (word);
+
 				tracker_statement_list_insert (metadata, uri,
 						     NIE_PREFIX "comment",
 						     word);
@@ -1108,6 +1112,8 @@ get_id3v23_tags (const gchar *data,
 				csize--;
 
 				if (!tracker_is_empty_string (word)) {
+					g_strstrip (word);
+
 					if (strcmp (tmap[i].text, "TRCK") == 0) {
 						gchar **parts;
 
@@ -1204,6 +1210,8 @@ get_id3v23_tags (const gchar *data,
 			}
 
 			if (!tracker_is_empty_string (word)) {
+				g_strstrip (word);
+
 				tracker_statement_list_insert (metadata, uri,
 						     NIE_PREFIX "comment",
 						     word);
@@ -1338,6 +1346,8 @@ get_id3v20_tags (const gchar *data,
 				csize--;
 
 				if (!tracker_is_empty_string (word)) {
+					g_strstrip (word);
+
 					if (strcmp (tmap[i].text, "COM") == 0) {
 						gchar *s;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]