Re: [Easytag-mailing] easytag genres



It turns out my problem with iTunes was actually because of references to ID3v1 genres that are expanded by Winamp (from 80 to 147). (http://de.wikipedia.org/wiki/Liste_der_ID3v1-Genres) So the problem was not really that easytag did anything wrong, but more that iTunes does not support that.

Anyway, I wrote a patch that adds an option to the id3 preferences to write the genre as text only, as suggested by Mark. This solves my and Isaac's problem by writing the genre as string instead of ID3v1 reference number if the checkbox is enabled.

On 16-6-2010 14:30, Mark Ferry wrote:
Hi

On 16/06/2010, Isaac Witmer<isaaclw gmail com>  wrote:
Is there anyway I can strip the files and then write the tags without
loosing them and manually going through all 800 files?

Sorry Isaac, just realised the issue is the use of ID3v1 genre IDs in
ID3v2 tags.
Stripping the tags won't make any difference.

One way to do it is write ID3v2 genre with an explicit ID3v1 ref
followed by the text name in  IDv2.3 style:
   http://www.id3.org/id3v2.3.0#head-42b02d20fb8bf48e38ec5415e34909945dd849dc
e.g.
Tag Hip-Hop as: "(7)Hip-Hop".

This makes easytag write text, and the genre is interpreted correctly
by Rhythmbox at least.

See Appendix A for Genre IDs:
   http://www.id3.org/id3v2.4.0-frames

You'd need to process the Genre field for each genre you use that's in
the ID3v1 list.
e.g.
   Process Fields
   Genre
   Convert "Hip-Hop" to "(7)Hip-Hop"
   Uncheck all uppercase/lowercase conversions
   Process


On 16/06/2010, Random Mister<random mister gmail com>  wrote:
  I just looked into it and found a (dirty) fix for the problem. Note that
  I did not test it very well, but it seems to work.
  In the source code of id_tag.c you have to replace this line: (line 291)
      genre_value = Id3tag_String_To_Genre(FileTag->genre);
  with this:
      genre_value = ID3_INVALID_GENRE;

Easytag is Doing the Right Thing according to 2.4.0.

  I will look into a more permanent solution when a have the time.

An option, unchecked by default, to force text-only TCON fields?

ciao
   Mark

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Easytag-mailing mailing list
Easytag-mailing lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/easytag-mailing

diff -crB ../easytag-2.1.6/src/id3_tag.c src/id3_tag.c
*** ../easytag-2.1.6/src/id3_tag.c	2008-03-22 23:03:06.000000000 +0100
--- src/id3_tag.c	2010-06-16 22:29:01.000000000 +0200
***************
*** 277,283 ****
  
          genre_value = Id3tag_String_To_Genre(FileTag->genre);
          // If genre not defined don't write genre value between brackets! (priority problem noted with some tools)
!         if (genre_value == ID3_INVALID_GENRE)
              genre_string_tmp = g_strdup_printf("%s",FileTag->genre);
          else
              genre_string_tmp = g_strdup_printf("(%d)",genre_value);
--- 277,283 ----
  
          genre_value = Id3tag_String_To_Genre(FileTag->genre);
          // If genre not defined don't write genre value between brackets! (priority problem noted with some tools)
!         if ((genre_value == ID3_INVALID_GENRE)||(FILE_WRITING_ID3V2_TEXT_ONLY_GENRE))
              genre_string_tmp = g_strdup_printf("%s",FileTag->genre);
          else
              genre_string_tmp = g_strdup_printf("(%d)",genre_value);
diff -crB ../easytag-2.1.6/src/id3v24_tag.c src/id3v24_tag.c
*** ../easytag-2.1.6/src/id3v24_tag.c	2008-07-12 16:32:12.000000000 +0200
--- src/id3v24_tag.c	2010-06-16 22:29:00.000000000 +0200
***************
*** 910,916 ****
      if (FileTag->genre)
          genre_value = Id3tag_String_To_Genre(FileTag->genre);
  
!     if (genre_value == ID3_INVALID_GENRE)
          string1 = g_strdup(FileTag->genre);
      else
          string1 = g_strdup_printf("%d",genre_value);
--- 910,916 ----
      if (FileTag->genre)
          genre_value = Id3tag_String_To_Genre(FileTag->genre);
  
!     if ((genre_value == ID3_INVALID_GENRE)||(FILE_WRITING_ID3V2_TEXT_ONLY_GENRE))
          string1 = g_strdup(FileTag->genre);
      else
          string1 = g_strdup_printf("%d",genre_value);
diff -crB ../easytag-2.1.6/src/prefs.c src/prefs.c
*** ../easytag-2.1.6/src/prefs.c	2008-01-18 23:01:39.000000000 +0100
--- src/prefs.c	2010-06-16 22:29:02.000000000 +0200
***************
*** 713,718 ****
--- 713,724 ----
      gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2UseCompression,1,2,1,2,GTK_FILL,GTK_FILL,0,0);
      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2UseCompression),FILE_WRITING_ID3V2_USE_COMPRESSION);
      gtk_tooltips_set_tip(Tips,FileWritingId3v2UseCompression,_("Set Compression in the ID3v2 tags"),NULL);
+ 	
+ 	/* Write Genre in text */
+     FileWritingId3v2TextOnlyGenre = gtk_check_button_new_with_label(_("Write Genre in text only"));
+     gtk_table_attach(GTK_TABLE(Table),FileWritingId3v2TextOnlyGenre,1,2,2,3,GTK_FILL,GTK_FILL,0,0);
+     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(FileWritingId3v2TextOnlyGenre),FILE_WRITING_ID3V2_TEXT_ONLY_GENRE);
+     gtk_tooltips_set_tip(Tips,FileWritingId3v2TextOnlyGenre,_("Don't use ID3v1 number references in genre tag. Enable this if you see numbers as genre in your music player."),NULL);	
  
      /* Character Set for writing ID3 tag */
      Frame = gtk_frame_new (_("Character Set for writing ID3 tags"));
***************
*** 1511,1516 ****
--- 1517,1523 ----
      ||   !FileWritingId3v2IconvOptionsIgnore
      ||   !FileWritingId3v2UseCrc32
      ||   !FileWritingId3v2UseCompression
+ 	||   !FileWritingId3v2TextOnlyGenre
      ||   !ConvertOldId3v2TagVersion
      ||   !LabelId3v1Charset
      ||   !FileWritingId3v1CharacterSetCombo
***************
*** 1553,1558 ****
--- 1560,1566 ----
          gtk_widget_set_sensitive(FileWritingId3v2IconvOptionsIgnore, !active);
          gtk_widget_set_sensitive(FileWritingId3v2UseCrc32, TRUE);
          gtk_widget_set_sensitive(FileWritingId3v2UseCompression, TRUE);
+ 		gtk_widget_set_sensitive(FileWritingId3v2TextOnlyGenre, TRUE);
          gtk_widget_set_sensitive(ConvertOldId3v2TagVersion, TRUE);
  
      }else
***************
*** 1572,1577 ****
--- 1580,1586 ----
          gtk_widget_set_sensitive(FileWritingId3v2IconvOptionsIgnore, FALSE);
          gtk_widget_set_sensitive(FileWritingId3v2UseCrc32, FALSE);
          gtk_widget_set_sensitive(FileWritingId3v2UseCompression, FALSE);
+ 		gtk_widget_set_sensitive(FileWritingId3v2TextOnlyGenre, FALSE);
          gtk_widget_set_sensitive(ConvertOldId3v2TagVersion, 0);
      }
  
diff -crB ../easytag-2.1.6/src/prefs.h src/prefs.h
*** ../easytag-2.1.6/src/prefs.h	2007-11-28 09:54:33.000000000 +0100
--- src/prefs.h	2010-06-16 22:29:02.000000000 +0200
***************
*** 79,84 ****
--- 79,85 ----
  GtkWidget *WriteId3TagsInFlacFiles;
  GtkWidget *FileWritingId3v2UseCrc32;
  GtkWidget *FileWritingId3v2UseCompression;
+ GtkWidget *FileWritingId3v2TextOnlyGenre;
  GtkWidget *StripTagWhenEmptyFields;
  GtkWidget *ConvertOldId3v2TagVersion;
  
diff -crB ../easytag-2.1.6/src/setting.c src/setting.c
*** ../easytag-2.1.6/src/setting.c	2008-05-25 00:32:38.000000000 +0200
--- src/setting.c	2010-06-16 22:29:03.000000000 +0200
***************
*** 708,713 ****
--- 708,714 ----
          FILE_WRITING_ID3V2_WRITE_TAG                 = GTK_TOGGLE_BUTTON(FileWritingId3v2WriteTag)->active;
          FILE_WRITING_ID3V2_USE_CRC32                 = GTK_TOGGLE_BUTTON(FileWritingId3v2UseCrc32)->active;
          FILE_WRITING_ID3V2_USE_COMPRESSION           = GTK_TOGGLE_BUTTON(FileWritingId3v2UseCompression)->active;
+ 		FILE_WRITING_ID3V2_TEXT_ONLY_GENRE           = GTK_TOGGLE_BUTTON(FileWritingId3v2TextOnlyGenre)->active;
          FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET = GTK_TOGGLE_BUTTON(FileWritingId3v2UseUnicodeCharacterSet)->active;
  
          active = gtk_combo_box_get_active(GTK_COMBO_BOX(FileWritingId3v2UnicodeCharacterSetCombo));
diff -crB ../easytag-2.1.6/src/setting.h src/setting.h
*** ../easytag-2.1.6/src/setting.h	2008-01-19 01:08:17.000000000 +0100
--- src/setting.h	2010-06-16 22:29:03.000000000 +0200
***************
*** 107,112 ****
--- 107,113 ----
  gint    FILE_WRITING_ID3V2_WRITE_TAG;
  gint    FILE_WRITING_ID3V2_USE_CRC32;
  gint    FILE_WRITING_ID3V2_USE_COMPRESSION;
+ gint    FILE_WRITING_ID3V2_TEXT_ONLY_GENRE;
  gint    FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET;
  gchar  *FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET;
  gchar  *FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET;


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