mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix url's from gallery scrapers (#4206)
* Fill in urls array when gallery scraper provides only single url
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user