diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2012-05-13 13:12:08 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2012-06-16 11:41:54 +0200 |
commit | d09c4b6b03d3630351f3c1139d61b551062522b8 (patch) | |
tree | 308b5b7b565dffd94adef9ea753ebfa3d4b4a04a | |
parent | 44984c75e16b2e743e05c828ad668a1c6009b8a6 (diff) |
Add composer sortname to track data
https://bugzilla.gnome.org/show_bug.cgi?id=661646
-rw-r--r-- | libjuicer/sj-structures.c | 2 | ||||
-rw-r--r-- | libjuicer/sj-structures.h | 1 | ||||
-rw-r--r-- | src/sj-prefs.c | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/libjuicer/sj-structures.c b/libjuicer/sj-structures.c index f166461..44f38bc 100644 --- a/libjuicer/sj-structures.c +++ b/libjuicer/sj-structures.c @@ -33,11 +33,11 @@ void track_details_free(TrackDetails *track) g_free (track->title); g_free (track->artist); g_free (track->composer); + g_free (track->composer_sortname); g_free (track->track_id); g_free (track->artist_id); g_free (track->artist_sortname); g_list_foreach (track->artists, (GFunc)artist_details_free, NULL); - g_free (track); } diff --git a/libjuicer/sj-structures.h b/libjuicer/sj-structures.h index 2bc4d50..4364387 100644 --- a/libjuicer/sj-structures.h +++ b/libjuicer/sj-structures.h @@ -47,6 +47,7 @@ struct _TrackDetails { char *artist; char* artist_sortname; /* Can be NULL, so fall back onto artist */ char* composer; + char* composer_sortname; int duration; /* seconds */ char* track_id; char* artist_id; diff --git a/src/sj-prefs.c b/src/sj-prefs.c index a15c1de..bdce5da 100644 --- a/src/sj-prefs.c +++ b/src/sj-prefs.c @@ -246,7 +246,7 @@ static void pattern_label_update (void) static const AlbumDetails sample_album = { .title = "Help!", /* title */ .artist = "The Beatles", /* artist */ - .artist_sortname = "Beatles, The", /* sortname */ + .artist_sortname = "Beatles, The", /* artist_sortname */ .genre = NULL, /* genre */ .number = 0, /* number of tracks*/ .disc_number = 1, /* disc number */ @@ -260,8 +260,9 @@ static void pattern_label_update (void) .number = 7, /* track number */ .title = "Ticket To Ride", /* title */ .artist = "The Beatles", /* artist */ - .artist_sortname = "Beatles, The", /* sortname */ + .artist_sortname = "Beatles, The", /* artist_sortname */ .composer = "John Lennon and Paul McCartney", /* composer */ + .composer_sortname = "Lennon, John", /* composer_sortname */ .duration = 0, /* duration */ .track_id = NULL, /* track ID */ .artist_id = NULL, /* artist ID */ |