refactor: moved magic strings to consts

This commit is contained in:
Deluan
2020-03-22 21:38:59 -04:00
parent 5ef80d2490
commit b4c7cac964
5 changed files with 18 additions and 7 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
. "github.com/Masterminds/squirrel"
"github.com/astaxie/beego/orm"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/log"
"github.com/deluan/navidrome/model"
"github.com/deluan/rest"
@@ -108,7 +109,7 @@ func (r *albumRepository) Refresh(ids ...string) error {
al.CoverArtId = ""
}
if al.Compilation {
al.AlbumArtist = "Various Artists"
al.AlbumArtist = consts.VariousArtists
}
if al.AlbumArtist == "" {
al.AlbumArtist = al.Artist