[sound-juicer] mb-test: Add composer information to tracks



commit 438bccf0775681fdeab50f72ee5410c82470c24f
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Sun Feb 22 17:00:10 2015 +0000

    mb-test: Add composer information to tracks
    
    Print out the composer for each track that has one.

 tests/mb-test.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tests/mb-test.c b/tests/mb-test.c
index 54f0ac7..98df045 100644
--- a/tests/mb-test.c
+++ b/tests/mb-test.c
@@ -86,7 +86,11 @@ metadata_cb (SjMetadataGetter *metadata, GList *albums, const GError *error)
     g_free (disc_number);
     while (album->tracks) {
       TrackDetails *track = (TrackDetails*)album->tracks->data;
-      g_print (" Track %d; Title: %s; Artist: %s Duration: %d sec\n", track->number, track->title, 
track->artist, track->duration);
+      gchar *composer;
+      composer = track->composer ? g_strdup_printf (" Composer: %s;", track->composer) : g_strdup ("");
+      g_print (" Track %d; Title: %s; Artist: %s;%s Duration: %d sec\n",
+               track->number, track->title, track->artist, composer, track->duration);
+      g_free (composer);
       album->tracks = g_list_next (album->tracks);
     }
     albums = g_list_next (albums);


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