[sound-juicer] Add label to AlbumDetails.
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Add label to AlbumDetails.
- Date: Wed, 19 Jun 2013 21:03:25 +0000 (UTC)
commit 4a151f219ba42f663d0ea753204b3369701a31ef
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Mon Jun 18 18:54:57 2012 +0100
Add label to AlbumDetails.
To disambiguate between albums with the same disc ID it would be
useful to display the recording label. NB musicbrainz provides a list
of recording labels for each release.
https://bugzilla.gnome.org/show_bug.cgi?id=674926
libjuicer/sj-structures.c | 11 +++++++++++
libjuicer/sj-structures.h | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/libjuicer/sj-structures.c b/libjuicer/sj-structures.c
index 3dc29c3..318a180 100644
--- a/libjuicer/sj-structures.c
+++ b/libjuicer/sj-structures.c
@@ -65,6 +65,7 @@ void album_details_free(AlbumDetails *album)
g_free (album->lyrics_url);
g_free (album->country);
g_free (album->type);
+ g_list_foreach (album->labels, (GFunc)label_details_free, NULL);
g_list_foreach (album->artists, (GFunc)artist_details_free, NULL);
g_list_free (album->artists);
g_free (album);
@@ -84,3 +85,13 @@ void artist_details_free (ArtistDetails *artist)
g_free (artist->joinphrase);
g_free (artist);
}
+
+/*
+ * Free a LabelDetails
+ */
+void label_details_free (LabelDetails *label)
+{
+ g_free (label->name);
+ g_free (label->sortname);
+ g_free (label);
+}
diff --git a/libjuicer/sj-structures.h b/libjuicer/sj-structures.h
index e2553f9..e97a76b 100644
--- a/libjuicer/sj-structures.h
+++ b/libjuicer/sj-structures.h
@@ -30,6 +30,7 @@ typedef enum _MetadataSource MetadataSource;
typedef struct _AlbumDetails AlbumDetails;
typedef struct _ArtistDetails ArtistDetails;
+typedef struct _LabelDetails LabelDetails;
typedef struct _TrackDetails TrackDetails;
enum _MetadataSource {
@@ -68,6 +69,7 @@ struct _AlbumDetails {
GDate *release_date; /* MusicBrainz support multiple releases per album */
char* album_id;
char* artist_id;
+ GList* labels;
char* asin;
char* discogs;
char* wikipedia;
@@ -96,9 +98,13 @@ struct _ArtistDetails {
char *joinphrase;
};
+struct _LabelDetails {
+ char *name;
+ char *sortname;
+};
void album_details_free(AlbumDetails *album);
void artist_details_free(ArtistDetails *artist);
+void label_details_free (LabelDetails *label);
void track_details_free(TrackDetails *track);
-
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]