fix cover.png maxsize

pull/14/head
itouakirai 7 months ago committed by GitHub
parent 39e97a857b
commit 2781879312
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      main.go

@ -1056,6 +1056,11 @@ func writeCover(sanAlbumFolder, url string) error {
if exists {
return nil
}
if config.CoverFormat == "png" {
re := regexp.MustCompile(`\{w\}x\{h\}`)
parts := re.Split(url, 2)
url = parts[0] + "{w}x{h}" + strings.Replace(parts[1], ".jpg", ".png", 1)
}
url = strings.Replace(url, "{w}x{h}", config.CoverSize, 1)
req, err := http.NewRequest("GET", url, nil)
if err != nil {

Loading…
Cancel
Save