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
@@ -4,6 +4,7 @@ import (
"fmt"
"time"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/model"
)
@@ -121,7 +122,7 @@ func FromMediaFile(mf *model.MediaFile) Entry {
func realArtistName(mf *model.MediaFile) string {
switch {
case mf.Compilation:
return "Various Artists"
return consts.VariousArtists
case mf.AlbumArtist != "":
return mf.AlbumArtist
}