diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2012-11-15 11:01:07 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-04-10 15:26:24 +0200 |
commit | 66ebceaf6a54e488d490c0864a2995e4a6d76e5c (patch) | |
tree | 195167bb96f9bae19055618f25180d6a7394b588 | |
parent | 95fc5b503b3187b8a545aaf9eb7ce2c95889fb7e (diff) |
Append 'Disc (m/n)' to title.
Enables disambiguation between the same album released as a single or
part of a box set.
https://bugzilla.gnome.org/show_bug.cgi?id=674926
-rw-r--r-- | src/sj-main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sj-main.c b/src/sj-main.c index c91ca24..68b479b 100644 --- a/src/sj-main.c +++ b/src/sj-main.c @@ -1035,14 +1035,20 @@ AlbumDetails* multiple_album_dialog(GList *albums) for (; albums ; albums = g_list_next (albums)) { GtkTreeIter iter; AlbumDetails *album = (AlbumDetails*)(albums->data); + GString *album_title = g_string_new (album->title); + + if (album->disc_number > 0 && album->disc_count > 0) + g_string_append_printf (album_title,_(" (Disc %d/%d)"), + album->disc_number, album->disc_count); gtk_list_store_append (albums_store, &iter); gtk_list_store_set (albums_store, &iter, - COLUMN_TITLE, album->title, + COLUMN_TITLE, album_title->str, COLUMN_ARTIST, album->artist, COLUMN_DETAILS, album, -1); - } + g_string_free (album_title, TRUE); + } /* Select the first album */ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (albums_store), &iter)) |