[rhythmbox] rhythmdb: update sortnames after display names (bug #612570)



commit b489f978e1ccded39bf2da580570baa954e8442d
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Mar 14 11:38:55 2010 +1000

    rhythmdb: update sortnames after display names (bug #612570)
    
    When updating the sort name, the display name must match the property
    value stored in the property model, so the display name must be updated
    before the sort names.

 rhythmdb/rhythmdb.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index 6173cf9..1b6f120 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -1941,18 +1941,6 @@ set_props_from_metadata (RhythmDB *db,
 					  RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID,
 					  "");
 
-	/* artist sortname */
-	set_metadata_string_with_default (db, metadata, entry,
-					  RB_METADATA_FIELD_ARTIST_SORTNAME,
-					  RHYTHMDB_PROP_ARTIST_SORTNAME,
-					  "");
-
-	/* album sortname */
-	set_metadata_string_with_default (db, metadata, entry,
-					  RB_METADATA_FIELD_ALBUM_SORTNAME,
-					  RHYTHMDB_PROP_ALBUM_SORTNAME,
-					  "");
-
 	/* filesize */
 	g_value_init (&val, G_TYPE_UINT64);
 	g_value_set_uint64 (&val, g_file_info_get_attribute_uint64 (fileinfo, G_FILE_ATTRIBUTE_STANDARD_SIZE));
@@ -1990,6 +1978,18 @@ set_props_from_metadata (RhythmDB *db,
 					  RB_METADATA_FIELD_ALBUM,
 					  RHYTHMDB_PROP_ALBUM,
 					  _("Unknown"));
+	/* artist sortname */
+	set_metadata_string_with_default (db, metadata, entry,
+					  RB_METADATA_FIELD_ARTIST_SORTNAME,
+					  RHYTHMDB_PROP_ARTIST_SORTNAME,
+					  "");
+
+	/* album sortname */
+	set_metadata_string_with_default (db, metadata, entry,
+					  RB_METADATA_FIELD_ALBUM_SORTNAME,
+					  RHYTHMDB_PROP_ALBUM_SORTNAME,
+					  "");
+
 }
 
 static gboolean



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