Increase album art placeholder's resolution
This commit is contained in:
parent
b836dfe7f4
commit
888151728f
|
@ -30,6 +30,8 @@ const (
|
|||
|
||||
I18nFolder = "i18n"
|
||||
SkipScanFile = ".ndignore"
|
||||
|
||||
PlaceholderAlbumArt = "navidrome-600x600.png"
|
||||
)
|
||||
|
||||
// Cache options
|
||||
|
|
|
@ -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 |
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue