code cleanup & fixed compatibility for non-JS users & fixed fullscreen images being in low resolution

This commit is contained in:
partisan 2024-11-19 10:36:33 +01:00
parent 0d083f53e7
commit db89f9c781
13 changed files with 474 additions and 300 deletions

View file

@ -151,13 +151,11 @@ func PerformDeviantArtImageSearch(query, safe, lang string, page int) ([]ImageSe
// Verify if the image URL is accessible
if DeviantArtisValidImageURL(imgSrc, DeviantArtImageUserAgent, resultURL) {
resultsChan <- ImageSearchResult{
Title: strings.TrimSpace(title),
Full: imgSrc,
Width: 0,
Height: 0,
Source: resultURL,
ProxyThumb: "/imgproxy?url=" + imgSrc, // Proxied thumbnail
ProxyFull: "/imgproxy?url=" + imgSrc, // Proxied full-size image
Title: strings.TrimSpace(title),
Full: imgSrc,
Width: 0,
Height: 0,
Source: resultURL,
}
}
}(imgSrc, resultURL, title)