[Easytag-mailing] [PATCH 3/3] Actually save ALBUM ARTIST= tags in OGG files
- From: "Christoph J. Thompson" <cjsthompson gmail com>
- To: easytag-mailing lists sourceforge net
- Subject: [Easytag-mailing] [PATCH 3/3] Actually save ALBUM ARTIST= tags in OGG files
- Date: Fri, 16 Mar 2012 18:07:09 +0100
Actually save ALBUM ARTIST= tags in OGG files. This has also been
throroughly tested for over two years.
modified: src/ogg_tag.c
---
src/ogg_tag.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/ogg_tag.c b/src/ogg_tag.c
index 826d661..15cfe98 100644
--- a/src/ogg_tag.c
+++ b/src/ogg_tag.c
@@ -279,6 +279,25 @@ gboolean Ogg_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
g_free(string);
}
+ /****************
+ * Album Artist *
+ ****************/
+ field_num = 0;
+ while ( (string = vorbis_comment_query(vc,"ALBUM ARTIST",field_num++)) != NULL )
+ {
+ string = Try_To_Validate_Utf8_String(string);
+
+ if ( g_utf8_strlen(string, -1) > 0 )
+ {
+ if (FileTag->album_artist==NULL)
+ FileTag->album_artist = g_strdup(string);
+ else
+ FileTag->album_artist = g_strconcat(FileTag->album_artist,MULTIFIELD_SEPARATOR,string,NULL);
+ }
+
+ g_free(string);
+ }
+
/*******************************
* Disc Number (Part of a Set) *
*******************************/
@@ -557,6 +576,7 @@ gboolean Ogg_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
&& strncasecmp(vc->user_comments[i],"ARTIST=", 7) != 0
&& strncasecmp(vc->user_comments[i],"ALBUMARTIST=", 12) != 0
&& strncasecmp(vc->user_comments[i],"ALBUM=", 6) != 0
+ && strncasecmp(vc->user_comments[i],"ALBUM ARTIST=", 13) != 0
&& strncasecmp(vc->user_comments[i],"DISCNUMBER=", 11) != 0
&& strncasecmp(vc->user_comments[i],"DATE=", 5) != 0
&& strncasecmp(vc->user_comments[i],"TRACKNUMBER=", 12) != 0
@@ -720,6 +740,14 @@ gboolean Ogg_Tag_Write_File_Tag (ET_File *ETFile)
Ogg_Write_Delimetered_Tag(vc,"ALBUM=",FileTag->album);
}
+ /****************
+ * Album Artist *
+ ****************/
+ if ( FileTag->album_artist )
+ {
+ Ogg_Write_Delimetered_Tag(vc,"ALBUM ARTIST=",FileTag->album_artist);
+ }
+
/***************
* Disc Number *
***************/
--
1.7.4.4
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]