[rhythmbox] rhythmdb: add sort key and folded properties for artist and album sortnames
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] rhythmdb: add sort key and folded properties for artist and album sortnames
- Date: Sat, 30 Jan 2010 04:00:37 +0000 (UTC)
commit f53b0f08b8286ac5403af5dc379a1a1158294e77
Author: Jamie Nicol <jamie thenicols net>
Date: Wed Jan 27 18:45:23 2010 +0000
rhythmdb: add sort key and folded properties for artist and album sortnames
See bug #133444.
rhythmdb/rhythmdb-tree.c | 4 ++++
rhythmdb/rhythmdb.c | 12 ++++++++++++
rhythmdb/rhythmdb.h | 5 +++++
3 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/rhythmdb/rhythmdb-tree.c b/rhythmdb/rhythmdb-tree.c
index 48902e4..905c2b5 100644
--- a/rhythmdb/rhythmdb-tree.c
+++ b/rhythmdb/rhythmdb-tree.c
@@ -1099,10 +1099,14 @@ save_entry (RhythmDBTree *db,
case RHYTHMDB_PROP_GENRE_SORT_KEY:
case RHYTHMDB_PROP_ARTIST_SORT_KEY:
case RHYTHMDB_PROP_ALBUM_SORT_KEY:
+ case RHYTHMDB_PROP_ARTIST_SORTNAME_SORT_KEY:
+ case RHYTHMDB_PROP_ALBUM_SORTNAME_SORT_KEY:
case RHYTHMDB_PROP_TITLE_FOLDED:
case RHYTHMDB_PROP_GENRE_FOLDED:
case RHYTHMDB_PROP_ARTIST_FOLDED:
case RHYTHMDB_PROP_ALBUM_FOLDED:
+ case RHYTHMDB_PROP_ARTIST_SORTNAME_FOLDED:
+ case RHYTHMDB_PROP_ALBUM_SORTNAME_FOLDED:
case RHYTHMDB_PROP_LAST_PLAYED_STR:
case RHYTHMDB_PROP_PLAYBACK_ERROR:
case RHYTHMDB_PROP_FIRST_SEEN_STR:
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index 93c5742..7166e0b 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -4320,11 +4320,15 @@ rhythmdb_prop_type_get_type (void)
ENUM_ENTRY (RHYTHMDB_PROP_GENRE_SORT_KEY, "Genre sort key (gchararray) [genre-sort-key]"),
ENUM_ENTRY (RHYTHMDB_PROP_ARTIST_SORT_KEY, "Artist sort key (gchararray) [artist-sort-key]"),
ENUM_ENTRY (RHYTHMDB_PROP_ALBUM_SORT_KEY, "Album sort key (gchararray) [album-sort-key]"),
+ ENUM_ENTRY (RHYTHMDB_PROP_ARTIST_SORTNAME_SORT_KEY, "Artist Sortname sort key (gchararray) [artist-sortname-sort-key]"),
+ ENUM_ENTRY (RHYTHMDB_PROP_ALBUM_SORTNAME_SORT_KEY, "Album Sortname sort key (gchararray) [album-sortname-sort-key]"),
ENUM_ENTRY (RHYTHMDB_PROP_TITLE_FOLDED, "Title folded (gchararray) [title-folded]"),
ENUM_ENTRY (RHYTHMDB_PROP_GENRE_FOLDED, "Genre folded (gchararray) [genre-folded]"),
ENUM_ENTRY (RHYTHMDB_PROP_ARTIST_FOLDED, "Artist folded (gchararray) [artist-folded]"),
ENUM_ENTRY (RHYTHMDB_PROP_ALBUM_FOLDED, "Album folded (gchararray) [album-folded]"),
+ ENUM_ENTRY (RHYTHMDB_PROP_ARTIST_SORTNAME_FOLDED, "Artist Sortname folded (gchararray) [artist-sortname-folded]"),
+ ENUM_ENTRY (RHYTHMDB_PROP_ALBUM_SORTNAME_FOLDED, "Album Sortname folded (gchararray) [album-sortname-folded]"),
ENUM_ENTRY (RHYTHMDB_PROP_LAST_PLAYED_STR, "Last Played (gchararray) [last-played-str]"),
ENUM_ENTRY (RHYTHMDB_PROP_PLAYBACK_ERROR, "Playback error string (gchararray) [playback-error]"),
ENUM_ENTRY (RHYTHMDB_PROP_HIDDEN, "Hidden (gboolean) [hidden]"),
@@ -5086,6 +5090,10 @@ rhythmdb_entry_get_string (RhythmDBEntry *entry,
return rb_refstring_get_sort_key (entry->artist);
case RHYTHMDB_PROP_GENRE_SORT_KEY:
return rb_refstring_get_sort_key (entry->genre);
+ case RHYTHMDB_PROP_ARTIST_SORTNAME_SORT_KEY:
+ return rb_refstring_get_sort_key (entry->artist_sortname);
+ case RHYTHMDB_PROP_ALBUM_SORTNAME_SORT_KEY:
+ return rb_refstring_get_sort_key (entry->album_sortname);
case RHYTHMDB_PROP_TITLE_FOLDED:
return rb_refstring_get_folded (entry->title);
case RHYTHMDB_PROP_ALBUM_FOLDED:
@@ -5094,6 +5102,10 @@ rhythmdb_entry_get_string (RhythmDBEntry *entry,
return rb_refstring_get_folded (entry->artist);
case RHYTHMDB_PROP_GENRE_FOLDED:
return rb_refstring_get_folded (entry->genre);
+ case RHYTHMDB_PROP_ARTIST_SORTNAME_FOLDED:
+ return rb_refstring_get_folded (entry->artist_sortname);
+ case RHYTHMDB_PROP_ALBUM_SORTNAME_FOLDED:
+ return rb_refstring_get_folded (entry->album_sortname);
case RHYTHMDB_PROP_LOCATION:
return rb_refstring_get (entry->location);
case RHYTHMDB_PROP_MOUNTPOINT:
diff --git a/rhythmdb/rhythmdb.h b/rhythmdb/rhythmdb.h
index d5c6487..1d61149 100644
--- a/rhythmdb/rhythmdb.h
+++ b/rhythmdb/rhythmdb.h
@@ -211,6 +211,11 @@ typedef enum
RHYTHMDB_PROP_ARTIST_SORTNAME,
RHYTHMDB_PROP_ALBUM_SORTNAME,
+ RHYTHMDB_PROP_ARTIST_SORTNAME_SORT_KEY,
+ RHYTHMDB_PROP_ARTIST_SORTNAME_FOLDED,
+ RHYTHMDB_PROP_ALBUM_SORTNAME_SORT_KEY,
+ RHYTHMDB_PROP_ALBUM_SORTNAME_FOLDED,
+
RHYTHMDB_NUM_PROPERTIES
} RhythmDBPropType;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]