-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Add custom command on action #95
Comments
Also for more use cases, it could also be triggered for failed actions, end of main loop, etc, with some Type as a param to differentiate them. |
Would this be different from Radarr/Sonarr Webhooks? It's definitely technically possible (on delete or failure to delete), but it's too close to existing functionality in the arrs and I'm trying to keep dependencies to a minimum. I was already pretty wary of adding Bazarr. You're right that there's no info regarding the Leaving Soon collection, except when adding something. |
@Schaka For sake of simplicity and dependency-free, I was thinking just a command, then the user can do whatever he wants with it! Imo it should cover most useful use cases, and could be quite easy to implement. What do you think? (I understand you don't want to duplicate functionalities, but none of the *arrs is aware of the Leaving Soon directory, so that's not really duplication :)) => Now that I think about it, I'm not sure Janitorr's current container has access to most Linux commands though.. |
You're correct. The container doesn't have access to random shell commands. It might be something that's possible to add, but if I were to add anything, I'd likely make it a generalized POST. I'll keep this ticket open, but don't hold your breath. Janitorr is roughly where I want it to be and I've moved most of my development efforts over to Naviseerr. |
I still think that's a bit "risky", as using a custom command could potentially cover way more use cases (for example I'm not even sure Janitorr accept POST, while ntfy does. And not every use case might go thru an API, some might need local commands at some point) I could propose a PR at some point if you don't mind |
Feel free to submit a PR that would solve this. You would likely:
|
Is there any way a webhook would solve this issue for you? |
@Schaka A webhook would be perfect! $ curl -u 'admin:password' 'http://localhost:2875/triggers/manual?path=/path/to/file&hash=1234567890'
# or
$ curl -H 'Authorization: Basic <base_64_encoded_login>' 'http://localhost:2875/triggers/manual?path=/path/to/file&hash=1234567890' But for a more general approach, ideally a webhook with a list of parameters that can be used in the URL, in a JSON payload, and as headers, would probably cover most needs. |
It could be quite useful to be able to configure a custom command (or a custom call to an URL?) when an action is done, i.e when a movie is deleted, or added/removed from Leaving Soon (but not sure the second part is totally possible as I don't think Janitorr keeps track of diffs?)
My use case would be to call a webhook (with the file/directory as parameter) on Autopulse, to have an efficient synchronization of Jellyfin's library (I believe because of symlinks it doesn't work that well for Leaving Soon on my instance by default)
The text was updated successfully, but these errors were encountered: