This commit is contained in:
ponzischeme89
2026-08-18 08:41:48 +12:00
parent 1da91e40a1
commit 36d171e51b
50 changed files with 4972 additions and 377 deletions
@@ -84,17 +84,25 @@ func filterStoredNotifications(notifications []store.UserNotification, prefs sto
if !prefs.Enabled {
return []store.UserNotification{}
}
if prefs.SonarrAlerts {
if prefs.SonarrAlerts && prefs.WatchTimeDigest {
return notifications
}
filtered := make([]store.UserNotification, 0, len(notifications))
for _, notification := range notifications {
switch notification.Kind {
case "show-return", "show-added", "show-cancelled", "auto-follow":
continue
default:
filtered = append(filtered, notification)
if !prefs.SonarrAlerts {
continue
}
// A summary already sitting in somebody's list is withdrawn the moment they turn
// these off, rather than waiting to be dismissed one at a time: switching a weekly
// notice off is a statement about the ones already there as much as the next one.
case watchTimeWeeklyKind, watchTimeMonthlyKind:
if !prefs.WatchTimeDigest {
continue
}
}
filtered = append(filtered, notification)
}
return filtered
}