mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 06:35:57 -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:
parent
9fc2065ada
commit
c3eb95d201
@ -95,9 +95,9 @@ library {
|
||||
# (changing this setting only takes effect after rescan, see the README)
|
||||
compilations = { "/Compilations" }
|
||||
|
||||
# Compilations usually have many artists, and if you don't want every
|
||||
# artist to be listed when artist browsing in Remote, you can set
|
||||
# a single name which will be used for all music in the compilation dir
|
||||
# Compilations usually have many artists, and sometimes no album arist.
|
||||
# If you don't want every non album artist to be listed in artist views,
|
||||
# you can set a single name which will be used for all compilations.
|
||||
# (changing this setting only takes effect after rescan, see the README)
|
||||
compilation_artist = "Various artists"
|
||||
|
||||
|
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:
|
||||
|
Loading…
Reference in New Issue
Block a user