Simplify resources code, enabling any resource to be overridden (not just translations)

This commit is contained in:
Deluan 2021-10-28 10:25:25 -04:00
parent 9072412812
commit fa3471f527
6 changed files with 30 additions and 20 deletions

View file

@ -1,19 +0,0 @@
package consts
import (
"fmt"
"strings"
"unicode"
"github.com/navidrome/navidrome/resources"
)
func loadBanner() string {
data, _ := resources.Asset("banner.txt")
return strings.TrimRightFunc(string(data), unicode.IsSpace)
}
func Banner() string {
version := "Version: " + Version()
return fmt.Sprintf("%s\n%52s\n", loadBanner(), version)
}

View file

@ -44,7 +44,7 @@ const (
I18nFolder = "i18n"
SkipScanFile = ".ndignore"
PlaceholderAlbumArt = "navidrome-600x600.png"
PlaceholderAlbumArt = "placeholder.png"
PlaceholderAvatar = "logo-192x192.png"
DefaultHttpClientTimeOut = 10 * time.Second