mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(notifications): Pushover add size (#1143)
This commit is contained in:
parent
f72fea998e
commit
58ca0a9d60
1 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
"github.com/autobrr/autobrr/internal/domain"
|
||||
"github.com/autobrr/autobrr/pkg/errors"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
|
@ -148,6 +149,9 @@ func (s *pushoverSender) buildMessage(payload domain.NotificationPayload) string
|
|||
if payload.ReleaseName != "" {
|
||||
msg += fmt.Sprintf("\n<b>New release:</b> %v", html.EscapeString(payload.ReleaseName))
|
||||
}
|
||||
if payload.Size > 0 {
|
||||
msg += fmt.Sprintf("\n<b>Size:</b> %v", humanize.Bytes(payload.Size))
|
||||
}
|
||||
if payload.Status != "" {
|
||||
msg += fmt.Sprintf("\n<b>Status:</b> %v", payload.Status.String())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue