[easytag] Add album artist support to APE tags
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Add album artist support to APE tags
- Date: Wed, 24 Dec 2014 09:45:02 +0000 (UTC)
commit 00f216188543d5460d4d10218e304f5fa70a418b
Author: David King <amigadave amigadave com>
Date: Wed Dec 24 09:37:09 2014 +0000
Add album artist support to APE tags
src/tags/ape_tag.c | 19 +++++++++++++++++++
src/tags/libapetag/apetaglib.h | 1 +
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/tags/ape_tag.c b/src/tags/ape_tag.c
index 7e377a6..d808217 100644
--- a/src/tags/ape_tag.c
+++ b/src/tags/ape_tag.c
@@ -86,6 +86,14 @@ ape_tag_read_file_tag (GFile *file,
if (FileTag->artist == NULL)
FileTag->artist = Try_To_Validate_Utf8_String(string);
+ /* Album artist. */
+ string = apefrm_getstr (ape_cnt, APE_TAG_FIELD_ALBUMARTIST);
+
+ if (FileTag->album_artist == NULL)
+ {
+ FileTag->album_artist = Try_To_Validate_Utf8_String (string);
+ }
+
/*********
* Album *
*********/
@@ -249,6 +257,17 @@ ape_tag_write_file_tag (const ET_File *ETFile,
else
apefrm_remove(ape_mem,APE_TAG_FIELD_ARTIST);
+ /* Album artist. */
+ if (FileTag->album_artist && g_utf8_strlen (FileTag->album_artist, -1) > 0)
+ {
+ apefrm_add (ape_mem, 0, APE_TAG_FIELD_ALBUMARTIST,
+ FileTag->album_artist);
+ }
+ else
+ {
+ apefrm_remove (ape_mem, APE_TAG_FIELD_ALBUMARTIST);
+ }
+
/*********
* Album *
*********/
diff --git a/src/tags/libapetag/apetaglib.h b/src/tags/libapetag/apetaglib.h
index 57f08bf..15ab8f2 100644
--- a/src/tags/libapetag/apetaglib.h
+++ b/src/tags/libapetag/apetaglib.h
@@ -80,6 +80,7 @@
#define APE_TAG_FIELD_TITLE "Title"
#define APE_TAG_FIELD_SUBTITLE "Subtitle"
#define APE_TAG_FIELD_ARTIST "Artist"
+#define APE_TAG_FIELD_ALBUMARTIST "Album Artist"
#define APE_TAG_FIELD_ALBUM "Album"
#define APE_TAG_FIELD_PART "Part"
#define APE_TAG_FIELD_DEBUTALBUM "Debut Album"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]