[easytag/wip/easytag-next] Write URL for FLAC and Vorbis to CONTACT field



commit 231da8bad14a081bbeab393feb2c19e7937072bb
Author: David King <amigadave amigadave com>
Date:   Sat Jan 12 15:55:47 2013 +0000

    Write URL for FLAC and Vorbis to CONTACT field
    
    EasyTAG incorrently wrote the URL of fies into the LICENSE field, but
    that field is for the license informaton (which may be a URL). CONTACT
    is a more appropriate field. Fixes bug 690301.

 src/flac_tag.c |    9 ++++++---
 src/ogg_tag.c  |    6 +++---
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/flac_tag.c b/src/flac_tag.c
index 8f8253b..76ffdbf 100644
--- a/src/flac_tag.c
+++ b/src/flac_tag.c
@@ -74,6 +74,9 @@
  *  - GENRE        : A short text indication of music genre
  *  - DATE         : Date the track was recorded
  *  - LOCATION     : Location where track was recorded
+ *  - CONTACT      : Contact information for the creators or distributors of
+ *                   the track. This could be a URL, an email address, the
+ *                   physical address of the producing label.
  *  - COPYRIGHT    : Copyright information
  *  - ISRC         : ISRC number for the track; see the ISRC intro page for more information on ISRC numbers.
  *
@@ -544,7 +547,7 @@ gboolean Flac_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
                  * URL *
                  *******/
                 field_num = 0;
-                while ( (field_num = FLAC__metadata_object_vorbiscomment_find_entry_from(block,field_num,"LICENSE")) >= 0 )
+                while ((field_num = FLAC__metadata_object_vorbiscomment_find_entry_from (block, field_num, "CONTACT")) >= 0)
                 {
                     /* Extract field value */
                     field = &vc->comments[field_num++];
@@ -615,7 +618,7 @@ gboolean Flac_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
                       && strncasecmp((gchar *)field->entry,"COMPOSER=",    MIN(9,  field->length)) != 0
                       && strncasecmp((gchar *)field->entry,"PERFORMER=",   MIN(10, field->length)) != 0
                       && strncasecmp((gchar *)field->entry,"COPYRIGHT=",   MIN(10, field->length)) != 0
-                      && strncasecmp((gchar *)field->entry,"LICENSE=",     MIN(8,  field->length)) != 0
+                      && strncasecmp((gchar *)field->entry,"CONTACT=",     MIN(8,  field->length)) != 0
                       && strncasecmp((gchar *)field->entry,"ENCODED-BY=",  MIN(11, field->length)) != 0 )
                     {
                         //g_print("custom %*s\n", field->length, field->entry);
@@ -985,7 +988,7 @@ gboolean Flac_Tag_Write_File_Tag (ET_File *ETFile)
         /*******
          * URL *
          *******/
-        Flac_Set_Tag(vc_block,"LICENSE=",FileTag->url,FALSE);
+        Flac_Set_Tag (vc_block, "CONTACT=", FileTag->url, FALSE);
 
         /**************
          * Encoded by *
diff --git a/src/ogg_tag.c b/src/ogg_tag.c
index 51d60dd..71d4cd6 100644
--- a/src/ogg_tag.c
+++ b/src/ogg_tag.c
@@ -462,7 +462,7 @@ gboolean Ogg_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
      * URL *
      *******/
     field_num = 0;
-    while ( (string = vorbis_comment_query(vc,"LICENSE",field_num++)) != NULL )
+    while ((string = vorbis_comment_query (vc, "CONTACT", field_num++)) != NULL)
     {
         string = Try_To_Validate_Utf8_String(string);
 
@@ -566,7 +566,7 @@ gboolean Ogg_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
           && strncasecmp(vc->user_comments[i],"COMPOSER=",         9) != 0
           && strncasecmp(vc->user_comments[i],"PERFORMER=",       10) != 0
           && strncasecmp(vc->user_comments[i],"COPYRIGHT=",       10) != 0
-          && strncasecmp(vc->user_comments[i],"LICENSE=",          8) != 0
+          && strncasecmp(vc->user_comments[i],"CONTACT=",          8) != 0
           && strncasecmp(vc->user_comments[i],"ENCODED-BY=",      11) != 0
           && strncasecmp(vc->user_comments[i],"COVERART=",         9) != 0
           && strncasecmp(vc->user_comments[i],"COVERARTTYPE=",       13) != 0
@@ -776,7 +776,7 @@ gboolean Ogg_Tag_Write_File_Tag (ET_File *ETFile)
     /*******
      * URL *
      *******/
-    Ogg_Set_Tag(vc,"LICENSE=",FileTag->url,FALSE);
+    Ogg_Set_Tag (vc, "CONTACT=", FileTag->url, FALSE);
 
     /**************
      * Encoded by *



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