mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-06 10:23:21 +03:00
Fix test
This commit is contained in:
parent
49f59fe9f4
commit
1a0563db2d
@ -9,6 +9,7 @@ import (
|
|||||||
"image/jpeg"
|
"image/jpeg"
|
||||||
_ "image/png"
|
_ "image/png"
|
||||||
"io"
|
"io"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -62,7 +63,8 @@ func (c *cover) Get(ctx context.Context, id string, size int, out io.Writer) err
|
|||||||
if err != model.ErrNotFound {
|
if err != model.ErrNotFound {
|
||||||
reader, err = readFromTag(path)
|
reader, err = readFromTag(path)
|
||||||
} else {
|
} else {
|
||||||
f, err := static.AssetFile().Open("default_cover.jpg")
|
var f http.File
|
||||||
|
f, err = static.AssetFile().Open("default_cover.jpg")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
reader = f
|
reader = f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user