mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fire hook when gallery created from image (#3134)
This commit is contained in:
@@ -255,6 +255,8 @@ func (h *ScanHandler) getOrCreateFolderBasedGallery(ctx context.Context, f file.
|
|||||||
return nil, fmt.Errorf("creating folder based gallery: %w", err)
|
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
|
// 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.
|
// need to be added to the new gallery. Find and add them now.
|
||||||
if err := h.associateFolderImages(ctx, newGallery); err != nil {
|
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)
|
return nil, fmt.Errorf("creating zip-based gallery: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.PluginCache.RegisterPostHooks(ctx, newGallery.ID, plugin.GalleryCreatePost, nil, nil)
|
||||||
|
|
||||||
return newGallery, nil
|
return newGallery, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
* Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060))
|
* Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 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 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 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))
|
* Fixed Saved Filters not ordered by name. ([#3101](https://github.com/stashapp/stash/pull/3101))
|
||||||
|
|||||||
Reference in New Issue
Block a user