[easytag/wip/unstable: 32/33] Write URL for FLAC and Vorbis to CONTACT field



commit 6326252f71a4ffe36e5977aee2d1ec49ec4fa415
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 f8b2bcd..ccdd85f 100644
--- a/src/flac_tag.c
+++ b/src/flac_tag.c
@@ -65,6 +65,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.
  *
@@ -532,7 +535,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++];
@@ -603,7 +606,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);
@@ -969,7 +972,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 a697dae..0289d83 100644
--- a/src/ogg_tag.c
+++ b/src/ogg_tag.c
@@ -461,7 +461,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);
 
@@ -559,7 +559,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
@@ -769,7 +769,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]