From bc5df7cfaf8e2437da522285bdc89d2b5cc10860 Mon Sep 17 00:00:00 2001 From: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com> Date: Sat, 30 Sep 2023 02:43:57 +0200 Subject: [PATCH] Fix gallery scraper url loading (#4157) --- pkg/scraper/cache.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/scraper/cache.go b/pkg/scraper/cache.go index c110944f624..539ecbb8b66 100644 --- a/pkg/scraper/cache.go +++ b/pkg/scraper/cache.go @@ -73,6 +73,7 @@ type TagFinder interface { type GalleryFinder interface { models.GalleryGetter models.FileLoader + models.URLLoader } type Repository struct { @@ -399,7 +400,12 @@ func (c Cache) getGallery(ctx context.Context, galleryID int) (*models.Gallery, return fmt.Errorf("gallery with id %d not found", galleryID) } - return ret.LoadFiles(ctx, c.repository.GalleryFinder) + err = ret.LoadFiles(ctx, c.repository.GalleryFinder) + if err != nil { + return err + } + + return ret.LoadURLs(ctx, c.repository.GalleryFinder) }); err != nil { return nil, err }