aaand last one

This commit is contained in:
Niko Storni 2022-05-18 16:15:45 +02:00
parent 5932cf9a2c
commit 0ca8bff0e2

View file

@ -133,7 +133,7 @@ func view(c *gin.Context) {
desiredQuality = int(q) desiredQuality = int(q)
} }
} }
redirectBaseURL = fmt.Sprintf("https://thumbnails.odycdn.com/optimize/s:%s:%s/quality:%d/plain/https://player.odycdn.com/speech/", width, height, desiredQuality) redirectBaseURL = fmt.Sprintf("https://source.thumbnails.odycdn.com/optimize/s:%s:%s/quality:%d/plain/https://player.odycdn.com/speech/", width, height, desiredQuality)
} }
c.Header("Cache-Control", "max-age=604800") c.Header("Cache-Control", "max-age=604800")
if parts := regexp.MustCompile(`^(view/)?([a-f0-9]+)/(.*?)\.(.*)$`).FindStringSubmatch(url); parts != nil { if parts := regexp.MustCompile(`^(view/)?([a-f0-9]+)/(.*?)\.(.*)$`).FindStringSubmatch(url); parts != nil {