image proxying

This commit is contained in:
Laptop
2024-10-26 11:08:05 +03:00
parent 4eae862bd6
commit 9416f14ef7
11 changed files with 143 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
package sc
import (
"net/url"
"strconv"
"strings"
"sync"
@@ -99,6 +100,10 @@ func (p *Playlist) Fix(cached bool) error {
p.Artwork = strings.Replace(p.Artwork, "-large.", "-t200x200.", 1)
}
if cfg.ProxyImages && p.Artwork != "" {
p.Artwork = "/proxy/images?url=" + url.QueryEscape(p.Artwork)
}
p.Author.Fix(false)
return nil