mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 01:33:44 -04: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)
|
# (changing this setting only takes effect after rescan, see the README)
|
||||||
compilations = { "/Compilations" }
|
compilations = { "/Compilations" }
|
||||||
|
|
||||||
# Compilations usually have many artists, and if you don't want every
|
# Compilations usually have many artists, and sometimes no album arist.
|
||||||
# artist to be listed when artist browsing in Remote, you can set
|
# If you don't want every non album artist to be listed in artist views,
|
||||||
# a single name which will be used for all music in the compilation dir
|
# you can set a single name which will be used for all compilations.
|
||||||
# (changing this setting only takes effect after rescan, see the README)
|
# (changing this setting only takes effect after rescan, see the README)
|
||||||
compilation_artist = "Various artists"
|
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;
|
break;
|
||||||
|
|
||||||
case DB_FIXUP_ALBUM_ARTIST: // Will be set after artist, because artist (must) come first in the col_maps
|
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)
|
if (ctx->mfi && ctx->mfi->media_kind == MEDIA_KIND_PODCAST)
|
||||||
{
|
{
|
||||||
free(*tag);
|
free(*tag);
|
||||||
@ -912,12 +904,14 @@ fixup_defaults(char **tag, enum fixup_type fixup, struct fixup_ctx *ctx)
|
|||||||
if (*tag)
|
if (*tag)
|
||||||
break;
|
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);
|
*tag = strdup(ctx->mfi->artist);
|
||||||
else if (ctx->queue_item && ctx->queue_item->artist)
|
else if (ctx->queue_item && ctx->queue_item->artist)
|
||||||
*tag = strdup(ctx->queue_item->artist);
|
*tag = strdup(ctx->queue_item->artist);
|
||||||
else
|
else
|
||||||
*tag = strdup("Unknown album artist");
|
*tag = strdup("Unknown artist");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DB_FIXUP_GENRE:
|
case DB_FIXUP_GENRE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user