mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-01 19:47:37 +03:00
fix(scanner): allow disabling splitting with the Tags
config option (#3869)
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
63dc0e2062
commit
be7cb59dc5
2 changed files with 11 additions and 3 deletions
|
@ -176,7 +176,11 @@ func (md Metadata) getRoleValues(role model.TagName) []string {
|
|||
if len(values) == 0 {
|
||||
return nil
|
||||
}
|
||||
if conf := model.TagRolesConf(); len(conf.Split) > 0 {
|
||||
conf := model.TagMainMappings()[role]
|
||||
if conf.Split == nil {
|
||||
conf = model.TagRolesConf()
|
||||
}
|
||||
if len(conf.Split) > 0 {
|
||||
values = conf.SplitTagValue(values)
|
||||
return filterDuplicatedOrEmptyValues(values)
|
||||
}
|
||||
|
@ -193,7 +197,11 @@ func (md Metadata) getArtistValues(single, multi model.TagName) []string {
|
|||
if len(vSingle) != 1 {
|
||||
return vSingle
|
||||
}
|
||||
if conf := model.TagArtistsConf(); len(conf.Split) > 0 {
|
||||
conf := model.TagMainMappings()[single]
|
||||
if conf.Split == nil {
|
||||
conf = model.TagArtistsConf()
|
||||
}
|
||||
if len(conf.Split) > 0 {
|
||||
vSingle = conf.SplitTagValue(vSingle)
|
||||
return filterDuplicatedOrEmptyValues(vSingle)
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ func loadTagMappings() {
|
|||
aliases = oldValue.Aliases
|
||||
}
|
||||
split := cfg.Split
|
||||
if len(split) == 0 {
|
||||
if split == nil {
|
||||
split = oldValue.Split
|
||||
}
|
||||
c := TagConf{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue