changeset 608:621e6ec66973 trunk

[svn] Obliterate empty tags, just like in mpg123.
author chainsaw
date Sun, 04 Feb 2007 13:40:53 -0800
parents 668851c95e15
children 9b73eb35f4ff
files ChangeLog src/vorbis/vorbis.c
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Feb 04 12:21:34 2007 -0800
+++ b/ChangeLog	Sun Feb 04 13:40:53 2007 -0800
@@ -1,3 +1,11 @@
+2007-02-04 20:21:34 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1300]
+  - remove streaming configuration since it's no longer relevant.
+  
+  trunk/src/vorbis/configure.c |  123 -------------------------------------------
+  1 file changed, 123 deletions(-)
+
+
 2007-02-04 20:19:29 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1298]
   - clean up the configure GUI a little.
--- a/src/vorbis/vorbis.c	Sun Feb 04 12:21:34 2007 -0800
+++ b/src/vorbis/vorbis.c	Sun Feb 04 13:40:53 2007 -0800
@@ -37,6 +37,8 @@
 
 #define DEBUG
 
+#define REMOVE_NONEXISTANT_TAG(x)   if (!*x) { x = NULL; }
+
 #include <glib.h>
 #include <gtk/gtk.h>
 
@@ -782,6 +784,13 @@
         tuple->genre = g_strdup(vorbis_comment_query(comment, "genre", 0));
         tuple->comment =
             g_strdup(vorbis_comment_query(comment, "comment", 0));
+
+        /* remove any blank tags */
+        REMOVE_NONEXISTANT_TAG(tuple->performer);
+        REMOVE_NONEXISTANT_TAG(tuple->album_name);
+        REMOVE_NONEXISTANT_TAG(tuple->track_name);
+        REMOVE_NONEXISTANT_TAG(tuple->genre);
+        REMOVE_NONEXISTANT_TAG(tuple->comment);
     }
 
     return tuple;