fix: harden discover artwork caching

This commit is contained in:
ShukeBta
2026-06-24 19:26:32 +08:00
parent d93a28f18f
commit aa506d6566
17 changed files with 658 additions and 104 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
package service
import (
"bytes"
"io"
"net/http"
"os"
"path/filepath"
"strings"
"sync/atomic"
"testing"
"time"
@@ -41,7 +41,7 @@ func TestDiscoverWarmExternalArtworkPrefetchesAndCaches(t *testing.T) {
StatusCode: http.StatusOK,
Status: "200 OK",
Header: http.Header{"Content-Type": []string{"image/jpeg"}},
Body: io.NopCloser(strings.NewReader("image:" + req.URL.Path)),
Body: io.NopCloser(bytes.NewReader(testJPEG)),
Request: req,
}, nil
})}