Add alerts, currency conversion and notifications.

Items fire when a page is available from an accepted seller at or below
max_price, converted with the ECB's daily rates when the page uses
another currency. A per-item cooldown, kept in the state file, holds
back repeat alerts unless the price drops. Alerts go to Discord, ntfy
and JSON webhooks with retries, and to the desktop;
'dibs notify test' sends a sample.
This commit is contained in:
Overlord committed 2026-10-14 11:55:27 +02:00
1 parent 2175c0e5aa
commit 8f0eda5d4d
16 files changed
+1409 -15

No files matched your search

+2 -2
View File
@@ -314,8 +314,8 @@ func (v *validator) notify(n *Notify) {
}
}
if n.Cooldown.Duration < 0 {
v.errorf("notify.cooldown", "must not be negative (got %s)", n.Cooldown)
if n.Cooldown.Duration < 0 || n.Cooldown.Duration > MaxCooldown {
v.errorf("notify.cooldown", "must be between 0s and %gh (got %s)", MaxCooldown.Hours(), n.Cooldown)
}
}