Fire hook when gallery created from image (#3134)

This commit is contained in:
WithoutPants 2022-11-17 08:23:08 +11:00 committed by GitHub
parent ffca8f0c0f
commit 3a63f1f9b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -255,6 +255,8 @@ func (h *ScanHandler) getOrCreateFolderBasedGallery(ctx context.Context, f file.
return nil, fmt.Errorf("creating folder based gallery: %w", err)
}
h.PluginCache.RegisterPostHooks(ctx, newGallery.ID, plugin.GalleryCreatePost, nil, nil)
// it's possible that there are other images in the folder that
// need to be added to the new gallery. Find and add them now.
if err := h.associateFolderImages(ctx, newGallery); err != nil {
@ -311,6 +313,8 @@ func (h *ScanHandler) getOrCreateZipBasedGallery(ctx context.Context, zipFile fi
return nil, fmt.Errorf("creating zip-based gallery: %w", err)
}
h.PluginCache.RegisterPostHooks(ctx, newGallery.ID, plugin.GalleryCreatePost, nil, nil)
return newGallery, nil
}

View File

@ -14,6 +14,7 @@
* Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060))
### 🐛 Bug fixes
* Fixed gallery create post hook not being fired during gallery creation. ([#3134](https://github.com/stashapp/stash/pull/3134))
* Fixed autotag error when tagging a large amount of objects. ([#3106](https://github.com/stashapp/stash/pull/3106))
* Fixed Gallery title being incorrectly marked as mandatory for file- and folder-based galleries. ([#3110](https://github.com/stashapp/stash/pull/3110))
* Fixed Saved Filters not ordered by name. ([#3101](https://github.com/stashapp/stash/pull/3101))