[db/scan] Force compilation artist if track belongs to a compilation

This commit is contained in:
chme 2022-04-04 20:52:48 +02:00
parent ecc139641a
commit e5d3c148ea

View File

@ -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);