mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Include path and hashes in destroy hook input (#2102)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
"github.com/stashapp/stash/pkg/plugin/common"
|
||||
)
|
||||
|
||||
@@ -125,3 +126,36 @@ func (e HookTriggerEnum) String() string {
|
||||
func addHookContext(argsMap common.ArgsMap, hookContext common.HookContext) {
|
||||
argsMap[common.HookContextKey] = hookContext
|
||||
}
|
||||
|
||||
// types for destroy hooks, to provide a little more information
|
||||
type SceneDestroyInput struct {
|
||||
models.SceneDestroyInput
|
||||
Checksum string `json:"checksum"`
|
||||
OSHash string `json:"oshash"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type ScenesDestroyInput struct {
|
||||
models.ScenesDestroyInput
|
||||
Checksum string `json:"checksum"`
|
||||
OSHash string `json:"oshash"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type GalleryDestroyInput struct {
|
||||
models.GalleryDestroyInput
|
||||
Checksum string `json:"checksum"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type ImageDestroyInput struct {
|
||||
models.ImageDestroyInput
|
||||
Checksum string `json:"checksum"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type ImagesDestroyInput struct {
|
||||
models.ImagesDestroyInput
|
||||
Checksum string `json:"checksum"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user