mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 05:34:58 -05:00
[db] Change use of compilation_artist, so that album_artist has preference
This change means that we will use album_artist even if compilation_artist is configured, thus compilation_artist will only be used to override artist.
This commit is contained in:
14
src/db.c
14
src/db.c
@@ -895,14 +895,6 @@ fixup_defaults(char **tag, enum fixup_type fixup, struct fixup_ctx *ctx)
|
||||
break;
|
||||
|
||||
case DB_FIXUP_ALBUM_ARTIST: // Will be set after artist, because artist (must) come first in the col_maps
|
||||
if (ctx->mfi && ctx->mfi->compilation && (ca = cfg_getstr(cfg_getsec(cfg, "library"), "compilation_artist")))
|
||||
{
|
||||
free(*tag);
|
||||
*tag = strdup(ca);
|
||||
}
|
||||
else if (ctx->mfi && ctx->mfi->compilation)
|
||||
*tag = strdup("");
|
||||
|
||||
if (ctx->mfi && ctx->mfi->media_kind == MEDIA_KIND_PODCAST)
|
||||
{
|
||||
free(*tag);
|
||||
@@ -912,12 +904,14 @@ fixup_defaults(char **tag, enum fixup_type fixup, struct fixup_ctx *ctx)
|
||||
if (*tag)
|
||||
break;
|
||||
|
||||
if (ctx->mfi && ctx->mfi->artist)
|
||||
if (ctx->mfi && ctx->mfi->compilation && (ca = cfg_getstr(cfg_getsec(cfg, "library"), "compilation_artist")))
|
||||
*tag = strdup(ca); // If ca is empty string then the artist will not be shown in artist view
|
||||
else if (ctx->mfi && ctx->mfi->artist)
|
||||
*tag = strdup(ctx->mfi->artist);
|
||||
else if (ctx->queue_item && ctx->queue_item->artist)
|
||||
*tag = strdup(ctx->queue_item->artist);
|
||||
else
|
||||
*tag = strdup("Unknown album artist");
|
||||
*tag = strdup("Unknown artist");
|
||||
break;
|
||||
|
||||
case DB_FIXUP_GENRE:
|
||||
|
||||
Reference in New Issue
Block a user