mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-16 01:03:16 -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("");
|
*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)
|
if (*tag)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (ctx->mfi && ctx->mfi->compilation && (ca = cfg_getstr(cfg_getsec(cfg, "library"), "compilation_artist")))
|
if (ctx->mfi && ctx->mfi->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);
|
*tag = strdup(ctx->mfi->artist);
|
||||||
else if (ctx->qi && ctx->qi->artist)
|
else if (ctx->qi && ctx->qi->artist)
|
||||||
*tag = strdup(ctx->qi->artist);
|
*tag = strdup(ctx->qi->artist);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user