mirror of
https://github.com/stashapp/stash.git
synced 2026-02-09 00:42:54 +01:00
Fix url's from gallery scrapers (#4206)
* Fill in urls array when gallery scraper provides only single url
This commit is contained in:
parent
479e716385
commit
40bcb4baa5
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue