-
Notifications
You must be signed in to change notification settings - Fork 283
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] Webhook integration to inform other applications and users when Download is finished #440
Comments
I wanna bring Apprise to our attention here as well as a honorable mention/alternative/addition/... :) https://github.com/caronc/apprise An app I already use and love uses it: I like the idea to integrate notifications. The unmonitored nature of this project as "set and forget" solution lends itself to notification systems. Hey, especially if you think of it as a way to offer to serve up PROPER "notification bells" for your favorite channels - no matter the platform they come from - no matter the Algorithm™ deciding for or against pushing it - no matter any of that AND you can land right on your own little video site turf! |
Basically if status reaction as POST webhook being implemented, you can attach apprise also and not calling it via CMD, it has own simple API. |
Interesting, so it looks like we can just send a POST request to Apprise's API endpoint, all users have to do is specify the URLs (e.g. I like Apprise better than Gotify since it seems like its a layer above, that is you can send gotify/discord/email messages using Apprise. Cool stuff! Definitely a fan of this feature, was thinking maybe v4.4 but maybe I'll sneak it in the next release. There's quite a few things to do before then but this kind of thing has been requested before so I will prioritize it. |
Sweet stuff! Just wanna know if there's any disadvantage to going Apprise to Gotify rather than Gotify to Apprise. Something I want to keep in mind though is... The call for notifications should be abstracted and its arguments fully handled contained in a separate module, so we can switch out the component for anything else if needed in the future without scanning and changing a lot of code at once. So basically like an internal API to a module doing all the heavy lifiting. That module could then also take care of "native notifications" to a possible PWA installed to an Android or Windows/GNU/Linux Desktop PWA client. Just food for thought. :) |
Basically there almost no difference between Gotify and Apprise API: # Gotify or as in a first post
curl -X POST -d "{ \"extras\": { \"home::appliances::lighting::on\": { \"brightness\": 15 }, \"home::appliances::thermostat::change_temperature\": { \"temperature\": 23 } }, \"message\": \"**Backup** was successfully finished.\", \"priority\": 2, \"title\": \"Backup\"}" "https://push.example.de/message?token=<apptoken>"
# Apprise
curl -X POST -d 'urls=mailto://user:pass@gmail.com&body=test message' http://localhost:8000/notify So if you implement common webhook function with Placeholders like: |
Ah, that's good to know. I just read up about Gotify and figured out why it could be worthwhile to also adapt Gotify directly without jumping through Apprise. Gotify is self-hosted and doesn't use infrastructure not under your own control. So you can even use it without Google's Push API cloud (whatever it's called). If you want to send around (semi)-secret notifications across clients this is a pretty nifty approach. Not sure if this works through Apprise as well. (idk, does it parse locally and implement the many supported protocols locallly? in that case it's just a wrapper for everything it supports which would be cool, otherwise it's its own cloud that then connects to the different protocols...) |
@Tzahi12345 can you call arbitrary web hooks with this, or only gotify/ntify/telegram? Also, is there any documentation on the feature? The code is buried a huge PR, so it's not easy to see eg. where config is read. |
v4.3.1 isn't released yet (definitely will be in the coming days!), I'm just putting the finishing touches. I kind of forgot about the webhook part and adding it would allow for basically any integration. I went ahead and added support for them. Here's the commit: fb27264. Tested with Zapier and Automatisch and it works well :) It definitely needed documentation so I made a wiki page which hopefully helps answer your questions: https://github.com/Tzahi12345/YoutubeDL-Material/wiki/Notifications Feel free to test out the functionality, let me know what works/doesn't! |
super helpful, thank you! |
Is your feature request related to a problem? Please describe.
Currently other applications and users do not know if download was already finished or not without visiting YoutubeDL page or re-scanning FS. There is no way besides to frequently call YoutubeDL API to get download statuses and in case of slow network nobody will watch it.
It would be nice to implement simple webhook with download status when it finished with success or an error.
Describe the solution you'd like
Simple web hook configuration with URL, GET or POST, and optionally Body. This will ensure e.g. user notifications implementation based on Gotify.
Additional context
e.g. to produce Gotify Notification you can simply call endpoint:
More about this API.
The text was updated successfully, but these errors were encountered: