Skip to content

Commit

Permalink
Fix gallery scraper url loading (#4157)
Browse files Browse the repository at this point in the history
  • Loading branch information
DingDongSoLong4 authored Sep 30, 2023
1 parent 9d5cc54 commit bc5df7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/scraper/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type TagFinder interface {
type GalleryFinder interface {
models.GalleryGetter
models.FileLoader
models.URLLoader
}

type Repository struct {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit bc5df7c

Please sign in to comment.