[sound-juicer] Add composer sortname to track data



commit d09c4b6b03d3630351f3c1139d61b551062522b8
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Sun May 13 13:12:08 2012 +0100

    Add composer sortname to track data
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661646

 libjuicer/sj-structures.c |    2 +-
 libjuicer/sj-structures.h |    1 +
 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 */



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