🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add timeout for artwork extraction
Deluan8cf78efb9c24
diff --git a/core/artwork.go b/core/artwork.goindex a0db2d2f6..72cb9df16 100644--- a/core/artwork.go+++ b/core/artwork.go@@ -17,6 +17,7 @@ import ("reflect""runtime""strings"+ "time""github.com/dhowden/tag""github.com/disintegration/imaging"@@ -46,6 +47,9 @@ type artwork struct {}func (a *artwork) Get(ctx context.Context, id string, size int) (io.ReadCloser, error) {+ ctx, cancel := context.WithTimeout(ctx, 10*time.Second)+ defer cancel()+var artID model.ArtworkIDvar err errorif id != "" {