fix: cache cloud artwork before library import

This commit is contained in:
ShukeBta
2026-06-11 00:54:29 +08:00
parent 542e85a067
commit d90b58ba22
6 changed files with 363 additions and 46 deletions
+5
View File
@@ -284,6 +284,11 @@ func cloudPlayHandler(svc *service.Container) gin.HandlerFunc {
}
func serveCloudResolvedLink(svc *service.Container, c *gin.Context, typ, ref string) {
if isCloudImageRef(ref) && svc != nil && svc.ImageProxy != nil {
if svc.ImageProxy.ServeCloudCached(c.Writer, c.Request, typ+":"+ref) {
return
}
}
if svc == nil || svc.StorageCfg == nil {
c.JSON(http.StatusServiceUnavailable, gin.H{"error": "cloud storage service unavailable"})
return