Do not attach Genres to the "Various Artists" artist

This commit is contained in:
Deluan 2021-09-27 21:55:33 -04:00
parent 73659e5669
commit e17d436902
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import (
"github.com/astaxie/beego/orm"
"github.com/deluan/rest"
"github.com/navidrome/navidrome/conf"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/utils"
@ -66,6 +67,9 @@ func (r *artistRepository) Put(a *model.Artist) error {
if err != nil {
return err
}
if a.ID == consts.VariousArtistsID {
return r.updateGenres(a.ID, r.tableName, nil)
}
return r.updateGenres(a.ID, r.tableName, a.Genres)
}