use a "CacheCover" folder for scaled covers

This commit is contained in:
sentriz
2020-07-24 20:24:57 +01:00
committed by Senan Kelly
parent 850f2f1216
commit dae1e03940
4 changed files with 32 additions and 15 deletions

View File

@@ -25,8 +25,9 @@ const (
type Controller struct {
*ctrlbase.Controller
CachePath string
Jukebox *jukebox.Jukebox
CachePath string
CoverCachePath string
Jukebox *jukebox.Jukebox
}
type metaResponse struct {

View File

@@ -106,7 +106,7 @@ func (c *Controller) ServeGetCoverArt(w http.ResponseWriter, r *http.Request) *s
}
size := params.GetOrInt("size", coverDefaultSize)
cachePath := path.Join(
c.CachePath,
c.CoverCachePath,
fmt.Sprintf("%s-%d.%s", id.String(), size, coverCacheFormat),
)
_, err = os.Stat(cachePath)