[sound-juicer] Append 'Disc (m/n)' to title.



commit 19c92d92e05a931a3db34dbc028ebd70d8252b01
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Thu Nov 15 11:01:07 2012 +0000

    Append 'Disc (m/n)' to title.
    
    Enables disambiguation between the same album released as a single or
    part of a box set. Only shown when there is more than on disc in a
    set.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674926

 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 c3df7c5..c036bc3 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -950,14 +950,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 > 1)
+      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))


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