quintodrome/core/artwork.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
592 B
Go
Raw Normal View History

package core
import (
"context"
_ "image/gif"
_ "image/png"
"io"
2020-04-04 18:23:20 -08:00
"github.com/navidrome/navidrome/consts"
2020-01-23 15:44:08 -09:00
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/resources"
2020-08-21 07:33:23 -08:00
_ "golang.org/x/image/webp"
)
type Artwork interface {
2020-11-17 09:30:37 -09:00
Get(ctx context.Context, id string, size int) (io.ReadCloser, error)
}
func NewArtwork(ds model.DataStore) Artwork {
return &artwork{ds: ds}
}
type artwork struct {
ds model.DataStore
2020-07-24 09:30:27 -08:00
}
2022-12-19 09:59:24 -09:00
func (a *artwork) Get(ctx context.Context, id string, size int) (io.ReadCloser, error) {
return resources.FS().Open(consts.PlaceholderAlbumArt)
}