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.
This commit is contained in:
Justin Maggard 2015-02-03 17:22:32 -08:00
parent 3c4c35b49c
commit 24fb139678
2 changed files with 13 additions and 5 deletions

View File

@ -400,12 +400,17 @@ GetAudioMetadata(const char *path, char *name)
break;
}
}
/* If there is a band associated with the album, use it for virtual containers. */
if( (i != ROLE_BAND) && (i != ROLE_ALBUMARTIST) )
/* If there is a album artist or band associated with the album,
use it for virtual containers. */
if( i < ROLE_ALBUMARTIST )
{
if( song.contributor[ROLE_BAND] && *song.contributor[ROLE_BAND] )
for( i = ROLE_ALBUMARTIST; i <= ROLE_BAND; i++ )
{
if( song.contributor[i] && *song.contributor[i] )
break;
}
if( i <= ROLE_BAND )
{
i = ROLE_BAND;
m.artist = trim(song.contributor[i]);
if( strlen(m.artist) > 48 )
{

View File

@ -117,6 +117,9 @@ _get_aactags(char *file, struct song_metadata *psong)
psong->album = strdup((char*)&current_data[16]);
else if(!memcmp(current_atom, "\xA9" "cmt", 4))
psong->comment = strdup((char*)&current_data[16]);
else if(!memcmp(current_atom, "aART", 4) ||
!memcmp(current_atom, "aart", 4))
psong->contributor[ROLE_ALBUMARTIST] = strdup((char*)&current_data[16]);
else if(!memcmp(current_atom, "\xA9" "dir", 4))
psong->contributor[ROLE_CONDUCTOR] = strdup((char*)&current_data[16]);
else if(!memcmp(current_atom, "\xA9" "wrt", 4))