0.3.35
This commit is contained in:
@@ -131,8 +131,8 @@ func (s *Server) scanSonarrLifecycle(ctx context.Context) (sonarrLifecycleResult
|
||||
Source: notifySourceSonarrLifecycle,
|
||||
UserID: user.ID,
|
||||
Username: user.Username,
|
||||
Title: "Show cancelled",
|
||||
Body: change.Current.Title + " has been cancelled.",
|
||||
Title: cancelledNotificationTitle(change.Current.Title),
|
||||
Body: cancelledNotificationBody(change.Current.Title),
|
||||
SourceKey: sourceKey,
|
||||
EventAt: &eventAt,
|
||||
Metadata: map[string]any{"series": change.Current.Title, "status": change.Current.Status},
|
||||
@@ -163,6 +163,14 @@ func sonarrLifecycleNotificationKind(previous, current string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func cancelledNotificationTitle(title string) string {
|
||||
return strings.TrimSpace(title) + " - Cancelled"
|
||||
}
|
||||
|
||||
func cancelledNotificationBody(title string) string {
|
||||
return strings.TrimSpace(title) + " has been cancelled by the network."
|
||||
}
|
||||
|
||||
func sonarrSeriesStatusKey(series sonarr.Series) string {
|
||||
if series.TVDBID > 0 {
|
||||
return "tvdb:" + strconv.Itoa(series.TVDBID)
|
||||
|
||||
Reference in New Issue
Block a user