stashapp/stash

Expand Hook Context

stg-annon opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
A hook could be called from many different sources, it would be good to know from what context a hook was called, was it a plugin? was it the UI? was it a task? Knowing what context will help hooks limit their functionality for example a plugin might only want to perform a hook on scenes edits that came from the UI, currently there is know way to know what caused the hook to fire.

Describe the solution you'd like
some kind of header that can be sent with a request to the api that is passed to the hook which can be referenced by the hook to determine if it should take an action or not