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
+3 -1
View File
@@ -70,7 +70,9 @@ func stopTranscodeHandler(svc *service.Container) gin.HandlerFunc {
func imageProxyHandler(svc *service.Container) gin.HandlerFunc {
return func(c *gin.Context) {
raw := c.Query("url")
if c.Query("retry") != "" || c.Query("refresh") != "" {
if c.Query("refresh") != "" {
_ = svc.ImageProxy.RemoveFailed(raw)
} else if c.Query("retry") != "" {
_ = svc.ImageProxy.RemoveFailed(raw)
}
// Serve handles upstream errors internally by returning a 1×1 PNG