mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 00:05:03 -05:00
[db/scan] Force compilation artist if track belongs to a compilation
This commit is contained in:
parent
ecc139641a
commit
e5d3c148ea
10
src/db.c
10
src/db.c
@ -1192,12 +1192,16 @@ fixup_defaults(char **tag, enum fixup_type fixup, struct fixup_ctx *ctx)
|
||||
*tag = strdup("");
|
||||
}
|
||||
|
||||
if (ctx->mfi && ctx->mfi->compilation && (ca = cfg_getstr(cfg_getsec(cfg, "library"), "compilation_artist")))
|
||||
{
|
||||
free(*tag);
|
||||
*tag = strdup(ca); // If ca is empty string then the artist will not be shown in artist view
|
||||
}
|
||||
|
||||
if (*tag)
|
||||
break;
|
||||
|
||||
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)
|
||||
if (ctx->mfi && ctx->mfi->artist)
|
||||
*tag = strdup(ctx->mfi->artist);
|
||||
else if (ctx->qi && ctx->qi->artist)
|
||||
*tag = strdup(ctx->qi->artist);
|
||||
|
Loading…
Reference in New Issue
Block a user