fix(scraper): handle base64 data URIs in processImageField (#6480)

Add check to skip HTTP fetch for non-HTTP URLs in processImageField(),
matching the existing behavior in setPerformerImage() and setStudioImage().

This allows scrapers to return base64 data URIs (e.g.,
`data:image/jpeg;base64,...`) directly without triggering an HTTP fetch
error. Previously, processImageField() would attempt to create an HTTP
request with the data URI as the URL, causing "Could not set image using
URL" warnings.
This commit is contained in:
CJ 2026-01-05 18:47:32 -06:00 committed by GitHub
parent fa80454891
commit c0260781a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,6 +68,12 @@ func processImageField(ctx context.Context, imageField *string, client *http.Cli
return nil
}
// don't try to get the image if it doesn't appear to be a URL
// this allows scrapers to return base64 data URIs directly
if !strings.HasPrefix(*imageField, "http") {
return nil
}
img, err := getImage(ctx, *imageField, client, globalConfig)
if err != nil {
return err