* Check all contributor types when determining the artist.
This commit is contained in:
parent
6d5ef54c06
commit
9a481196fc
10
metadata.c
10
metadata.c
@ -130,7 +130,7 @@ GetAudioMetadata(const char * path, char * name)
|
||||
sqlite_int64 ret;
|
||||
char *sql;
|
||||
char *title, *artist = NULL, *album = NULL, *genre = NULL, *comment = NULL, *date = NULL;
|
||||
int free_flags = 0;
|
||||
int i, free_flags = 0;
|
||||
sqlite_int64 album_art = 0;
|
||||
char art_dlna_pn[9];
|
||||
struct song_metadata song;
|
||||
@ -197,15 +197,19 @@ GetAudioMetadata(const char * path, char * name)
|
||||
{
|
||||
title = name;
|
||||
}
|
||||
if( song.contributor[ROLE_ARTIST] )
|
||||
for( i=ROLE_START; i<N_ROLE; i++ )
|
||||
{
|
||||
artist = song.contributor[ROLE_ARTIST];
|
||||
if( song.contributor[i] )
|
||||
{
|
||||
artist = song.contributor[i];
|
||||
artist = trim(artist);
|
||||
if( index(artist, '&') )
|
||||
{
|
||||
free_flags |= FLAG_ARTIST;
|
||||
artist = modifyString(strdup(artist), "&", "&amp;", 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( song.album )
|
||||
{
|
||||
|
@ -482,7 +482,7 @@ _get_asffileinfo(char *file, struct song_metadata *psong)
|
||||
if(_asf_load_string(fp, ValueType, ValueLength, buf, sizeof(buf)))
|
||||
{
|
||||
if(buf[0])
|
||||
psong->contributor[ROLE_ARTIST] = strdup(buf);
|
||||
psong->contributor[ROLE_ALBUMARTIST] = strdup(buf);
|
||||
}
|
||||
}
|
||||
else if(!strcasecmp(buf, "Description") || !strcasecmp(buf, "WM/Track"))
|
||||
|
@ -1321,7 +1321,7 @@ SendResp_dlnafile(struct upnphttp * h, char * object)
|
||||
DPRINTF(E_WARN, L_HTTP, "%s not found, responding ERROR 404\n", object);
|
||||
sqlite3_free_table(result);
|
||||
Send404(h);
|
||||
goto error;
|
||||
return;
|
||||
}
|
||||
/* Cache the result */
|
||||
last_file.id = id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user