Skip to content

Commit 772c033

Browse files
committed
Chore: update readme to reflect changes after rewriting in rust
1 parent 964757b commit 772c033

3 files changed

Lines changed: 36 additions & 12 deletions

File tree

README.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Hookbuffer
22

3-
Essentially a webhook proxy server.
3+
Essentially a buffering webhook proxy server.
44

5-
Takes in webhooks that originate from Sonarr and are intended for Discord. It catches "Grabbed" and "imported" notifications from Sonarr, uses some timers to add a delay in which it can catch and group together many notifications by show and season, then pass those groupings along to the intended Discord webhook URL. Sonarr should probably have this built in.... but until then I made this. I don't really expect anyone else to use this, this is my first (and last for a while) Go project and helps solve an annoyance.
5+
Takes in webhooks that originate from Sonarr and are intended for Discord. It catches grab, import, and upgrade event notifications from Sonarr, uses some timers to add a delay in which it can catch and group together many notifications by show and season, then pass those groupings along to the intended Discord webhook URL. Sonarr should probably have this built in.... but until then I made this.
6+
7+
Hookbuffer keeps separate queues of messages for each Discord URL it recieves notifications for. This allows 1 Hookbuffer instance to be used for multiple Sonarr instances which go to different destinations without messages getting crossed, which is why I have Hookbuffer deployed to the cloud.
68

79
Main benefits:
810
- Use Sonarr notifications without as much spam
@@ -11,22 +13,44 @@ Main benefits:
1113

1214
#### Example:
1315

14-
![Example](https://i.imgur.com/GlZTAZc.png)
16+
![Example](/assets/example_results.png)
1517

16-
Instead of 9 separate Discord messages (one per episode), Hookbuffer groups them by season and sends them to Discord.
18+
Instead of 60+ separate Discord messages (one per episode), Hookbuffer groups them by season and sends them to Discord.
1719

18-
### Usage:
20+
### Usage:
1921

20-
It's on Dockerhub: https://hub.docker.com/r/cbackas/hookbuffer
22+
#### Deploying App
2123

22-
```docker run --name hookbuffer -p 5369:5369 cback/hookbuffer:latest```
24+
Docker image can be found on Github Container Registry: https://github.com/cbackas/hookbuffer/pkgs/container/hookbuffer
2325

24-
Or you can build it and run it using commands
26+
`docker run --name hookbuffer -p 8000:8000 ghcr.io/cbackas/hookbuffer:latest`
27+
28+
#### Authentication:
29+
If you deploy this container on the same local network as your Sonarr instance, you don't really need authentication. But if you deploy it to tyhe cloud, you should enable hookbuffer's auth feature. You can add authentication checks by setting the `HOOKBUFFER_USER` and `HOOKBUFFER_PASS` environment variables, ex:
30+
`docker run --name hookbuffer -p 8000:8000 -e HOOKBUFFER_USER=user -e HOOKBUFFER_PASS=pass ghcr.io/cbackas/hookbuffer:latest`
31+
32+
#### Other Env vars:
33+
- `HOOKBUFFER_PORT` - Port to listen on inside container (default 8000)
34+
- `HOOKBUFFER_DESTINATION_URL` - The URL used to send the grouped webhooks to. Defaults to `https://discordapp.com/`
2535

26-
```go build cmd/hookbuffer```
36+
#### Configuring Sonarr
37+
First you need to create a Discord webhook in the Discord channel you want to send notifications to. You can do this by going to the channel settings, then "Integrations" and "Webhooks". Create a webhook and copy the URL. More here: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
2738

28-
```./hookbuffer```
39+
Next we need to configure Sonarr to send notifications through Hookbuffer.
40+
1. Go to Sonarr -> Settings -> Connect
41+
2. Create new connection, choose "Webhook" as the connection type
42+
3. Give the connection a name and *enable the "On Grab", "On Import", and "On Upgrade" triggers*
43+
4. Configure Webhook URL
44+
a. Paste your Discord webhook URL into the "Webhook URL" field
45+
b. Replace the "https://discordapp.com/" part of the URL with 'http://\<hookbuffer_host_ip\>:\<hookbuffer_port\>' (example: https://discordapp.com/api/webhooks/12345678910/abcdefghijklmnopqrstuvwxyz -> http://192.168.0.30:8000/api/webhooks/12345678910/abcdefghijklmnopqrstuvwxyz)
46+
5. Optional: If you configured the `HOOKBUFFER_USER` and `HOOKBUFFER_PASS` env variables, then you can put those values into the "Username" and "Password" fields
47+
6. Test and Save the connection
2948

30-
Then in Sonarr, go to "Connections" and set up a Discord connection, get a webhook URL from your Discord client, paste that URL and replace https://discordapp.com/ with http://\<host ip\>:5369/ (retaining /api/webhooks/ and everything after it) (Example: https://i.imgur.com/RvZUMOk.png)
49+
![Sonarr Config Example](/assets/example_sonarr_config.png)
50+
51+
### Build it yourself:
52+
53+
Or you can build it and run it using commands
3154

32-
Currently has no support for passing through the username or avatar fields, as I have those configured directly on my webhooks in Discord.
55+
Build and run: `cargo run`
56+
Build Executable: `cargo build --release`

assets/example_results.png

919 KB
Loading

assets/example_sonarr_config.png

446 KB
Loading

0 commit comments

Comments
 (0)