mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-19 15:23:36 +00:00
Embed static files used by Subsonic API
This commit is contained in:
1 parent
f63b1703e6
commit
49f59fe9f4
8 files changed
+337
-8
No files matched your search
+2
-2
@@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/deluan/navidrome/model"
|
||||
"github.com/deluan/navidrome/static"
|
||||
"github.com/dhowden/tag"
|
||||
"github.com/nfnt/resize"
|
||||
)
|
||||
@@ -61,8 +62,7 @@ func (c *cover) Get(ctx context.Context, id string, size int, out io.Writer) err
|
||||
if err != model.ErrNotFound {
|
||||
reader, err = readFromTag(path)
|
||||
} else {
|
||||
var f *os.File
|
||||
f, err = os.Open("static/default_cover.jpg")
|
||||
f, err := static.AssetFile().Open("default_cover.jpg")
|
||||
if err == nil {
|
||||
defer f.Close()
|
||||
reader = f
|
||||
|
||||
Reference in new issue
Block a user