Increase album art placeholder's resolution

This commit is contained in:
Deluan 2020-06-03 09:40:37 -04:00
parent b836dfe7f4
commit 888151728f
5 changed files with 5 additions and 2 deletions

View File

@ -30,6 +30,8 @@ const (
I18nFolder = "i18n"
SkipScanFile = ".ndignore"
PlaceholderAlbumArt = "navidrome-600x600.png"
)
// Cache options

View File

@ -122,7 +122,7 @@ func (c *cover) getCover(ctx context.Context, path string, size int) (reader io.
defer func() {
if err != nil {
log.Warn(ctx, "Error extracting image", "path", path, "size", size, err)
reader, err = resources.AssetFile().Open("navidrome-310x310.png")
reader, err = resources.AssetFile().Open(consts.PlaceholderAlbumArt)
}
}()
var data []byte

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

View File

@ -4,6 +4,7 @@ import (
"io"
"net/http"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/engine"
"github.com/deluan/navidrome/log"
"github.com/deluan/navidrome/model"
@ -21,7 +22,7 @@ func NewMediaRetrievalController(cover engine.Cover) *MediaRetrievalController {
}
func (c *MediaRetrievalController) GetAvatar(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
f, err := resources.AssetFile().Open("navidrome-310x310.png")
f, err := resources.AssetFile().Open(consts.PlaceholderAlbumArt)
if err != nil {
log.Error(r, "Image not found", err)
return nil, NewError(responses.ErrorDataNotFound, "Avatar image not found")