From 24fb13967822db92cc0bd82119535d02f7c205db Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Tue, 3 Feb 2015 17:22:32 -0800 Subject: [PATCH] metadata: Use "Album Artist" tag from AAC files. Add Album Artist AAC metadata parsing contributed by SF user knono549. Then, change music metadata gathering code to use either Album Artist or Band as upnp:artist. --- metadata.c | 15 ++++++++++----- tagutils/tagutils-aac.c | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/metadata.c b/metadata.c index f3987c6..6c9b995 100644 --- a/metadata.c +++ b/metadata.c @@ -381,7 +381,7 @@ GetAudioMetadata(const char *path, char *name) { m.title = name; } - for( i=ROLE_START; i 48 ) { diff --git a/tagutils/tagutils-aac.c b/tagutils/tagutils-aac.c index ed6fb55..fcdb573 100644 --- a/tagutils/tagutils-aac.c +++ b/tagutils/tagutils-aac.c @@ -117,6 +117,9 @@ _get_aactags(char *file, struct song_metadata *psong) psong->album = strdup((char*)¤t_data[16]); else if(!memcmp(current_atom, "\xA9" "cmt", 4)) psong->comment = strdup((char*)¤t_data[16]); + else if(!memcmp(current_atom, "aART", 4) || + !memcmp(current_atom, "aart", 4)) + psong->contributor[ROLE_ALBUMARTIST] = strdup((char*)¤t_data[16]); else if(!memcmp(current_atom, "\xA9" "dir", 4)) psong->contributor[ROLE_CONDUCTOR] = strdup((char*)¤t_data[16]); else if(!memcmp(current_atom, "\xA9" "wrt", 4))