From 43deee63b353a41f0097717eb2d24ece333bfda4 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Oct 31 2007 11:23:15 +0000 Subject: - Add patch to fix problems with metadata loss when it has a space at the end of it (#357951) --- diff --git a/rhythmbox-0.10.1-fix-metadata-trailing-space.patch b/rhythmbox-0.10.1-fix-metadata-trailing-space.patch new file mode 100644 index 0000000..c6f6939 --- /dev/null +++ b/rhythmbox-0.10.1-fix-metadata-trailing-space.patch @@ -0,0 +1,40 @@ +--- branches/RHYTHMBOX-0_10/metadata/rb-metadata-gst.c 2007/04/21 13:16:42 5054 ++++ branches/RHYTHMBOX-0_10/metadata/rb-metadata-gst.c 2007/06/03 02:20:08 5146 +@@ -665,7 +665,6 @@ + * and then remove leading and trailing whitespace. + */ + char *str; +- const char *old_str; + + str = g_value_dup_string (newval); + +@@ -680,15 +679,20 @@ + + /* Check whether we have a shorter duplicate tag, + * Doesn't work with non-normalised UTF-8 strings */ +- old_str = g_value_get_string (val); +- if (old_str != NULL +- && g_utf8_strlen (old_str, -1) > g_utf8_strlen (str, -1)) { +- if (g_str_has_prefix (old_str, str) != FALSE) { +- rb_debug ("Got shorter duplicate tag"); +- g_free (str); +- g_value_unset (newval); +- g_free (newval); +- return; ++ val = g_hash_table_lookup (md->priv->metadata, ++ GINT_TO_POINTER (field)); ++ if (val != NULL) { ++ const char *old_str; ++ old_str = g_value_get_string (val); ++ if (old_str != NULL ++ && g_utf8_strlen (old_str, -1) > g_utf8_strlen (str, -1)) { ++ if (g_str_has_prefix (old_str, str) != FALSE) { ++ rb_debug ("Got shorter duplicate tag"); ++ g_free (str); ++ g_value_unset (newval); ++ g_free (newval); ++ return; ++ } + } + } + g_value_take_string (newval, str); diff --git a/rhythmbox.spec b/rhythmbox.spec index ca05715..12bad70 100644 --- a/rhythmbox.spec +++ b/rhythmbox.spec @@ -3,7 +3,7 @@ Name: rhythmbox Summary: Music Management Application Version: 0.11.2 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ and GFDL+ Group: Applications/Multimedia URL: http://www.gnome.org/projects/rhythmbox/ @@ -55,6 +55,8 @@ Patch4: rhythmbox-0.11.2-dont-escape-primary-in-notifications.patch Patch5: rb-disable-local-uri-escaping-5.patch # http://bugzilla.gnome.org/show_bug.cgi?id=346434 Patch6: rb-delete-ipod-tracks.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=357951 +Patch7: rhythmbox-0.10.1-fix-metadata-trailing-space.patch %description Rhythmbox is an integrated music management application based on the powerful @@ -98,6 +100,7 @@ popd pushd plugins/ipod/ %patch6 -p0 -b .ipod-trash popd +%patch7 -p2 -b .trailing-space %build @@ -208,6 +211,10 @@ fi %{_libdir}/rhythmbox/plugins/upnp_coherence %changelog +* Wed Oct 31 2007 - Bastien Nocera - 0.11.2-11 +- Add patch to fix problems with metadata loss when it has a space at the + end of it (#357951) + * Mon Oct 29 2007 - Bastien Nocera - 0.11.2-10 - Update patch for #242260, tooltips weren't working - Add patch to fix problems importing files with spaces in them (#291571)