diff --git a/pkg/scraper/postprocessing.go b/pkg/scraper/postprocessing.go index e504e4d1cac..17aadf730cb 100644 --- a/pkg/scraper/postprocessing.go +++ b/pkg/scraper/postprocessing.go @@ -167,6 +167,14 @@ func (c Cache) postScrapeScene(ctx context.Context, scene ScrapedScene) (Scraped } func (c Cache) postScrapeGallery(ctx context.Context, g ScrapedGallery) (ScrapedContent, error) { + // set the URL/URLs field + if g.URL == nil && len(g.URLs) > 0 { + g.URL = &g.URLs[0] + } + if g.URL != nil && len(g.URLs) == 0 { + g.URLs = []string{*g.URL} + } + if err := txn.WithReadTxn(ctx, c.txnManager, func(ctx context.Context) error { pqb := c.repository.PerformerFinder tqb := c.repository.TagFinder