[tracker] Adapted album-art name determination to follow new spec rules
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] Adapted album-art name determination to follow new spec rules
- Date: Wed, 22 Apr 2009 04:41:42 -0400 (EDT)
commit 2f6c22488ad22e826988531a964367ce6a98153a
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Apr 22 10:41:05 2009 +0200
Adapted album-art name determination to follow new spec rules
---
src/libtracker-common/tracker-albumart.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/libtracker-common/tracker-albumart.c b/src/libtracker-common/tracker-albumart.c
index 9b3dd6d..f220db3 100644
--- a/src/libtracker-common/tracker-albumart.c
+++ b/src/libtracker-common/tracker-albumart.c
@@ -239,6 +239,24 @@ strip_characters (const gchar *original)
retval[y] = 0;
+ y--;
+ while (retval[y] == ' ') {
+ retval[y] = 0;
+ y--;
+ }
+
+ if (retval[0] == ' ') {
+ guint r = 0;
+ gchar *newr;
+
+ while (retval[r] == ' ')
+ r++;
+
+ newr = g_strdup (retval + r);
+ g_free (retval);
+ retval = newr;
+ }
+
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]