[totem] properties: Show Vorbis DESCRIPTION in Comment



commit b56e6a6e4a09d9c3efb768fef4330c4a9b95be16
Author: Chris Mayo <aklhfex gmail com>
Date:   Wed Dec 21 20:07:05 2011 +0000

    properties: Show Vorbis DESCRIPTION in Comment
    
    Currently the Comment field is empty on Nautilus Audio Properties Tab
    for files with headers using the minimal list of names from
    the Vorbis format specification which uses DESCRIPTION:
    http://xiph.org/vorbis/doc/v-comment.html.
    
    Still prefer COMMENT but if that does not exist check for DESCRIPTION.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=666411
    
    Signed-off-by: Chris Mayo <aklhfex gmail com>

 src/totem-properties-view.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-properties-view.c b/src/totem-properties-view.c
index e145a0d..a49c061 100644
--- a/src/totem-properties-view.c
+++ b/src/totem-properties-view.c
@@ -71,10 +71,10 @@ update_general (TotemPropertiesView *props,
 		{ GST_TAG_TITLE, "title" },
 		{ GST_TAG_ARTIST, "artist" },
 		{ GST_TAG_ALBUM, "album" },
-		{ GST_TAG_COMMENT, "comment" },
 	};
 	guint i;
         GDate *date;
+	gchar *comment;
 
 	for (i = 0; i < G_N_ELEMENTS(items); i++) {
 		char *string;
@@ -86,7 +86,18 @@ update_general (TotemPropertiesView *props,
 			g_free (string);
 		}
 	}
+	
+	/* Comment else use Description defined by:
+	 * http://xiph.org/vorbis/doc/v-comment.html */
+	if (gst_tag_list_get_string (list, GST_TAG_COMMENT, &comment) ||
+		gst_tag_list_get_string (list, GST_TAG_DESCRIPTION, &comment)) {
 
+		bacon_video_widget_properties_set_label (props->priv->props,
+							 "comment",
+							 comment);
+		g_free (comment);
+        }
+	
 	/* Date */
         if (gst_tag_list_get_date (list, GST_TAG_DATE, &date)) {
 		char *string;



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