0.1.52 Gateway

This commit is contained in:
ponzischeme89
2026-08-17 19:09:17 +12:00
parent d5a8d3ad88
commit 1da91e40a1
46 changed files with 1626 additions and 106 deletions
+3 -6
View File
@@ -180,7 +180,8 @@ func liveAlerts(stored []storedAlert, now time.Time) []clientAlert {
// sonarrAiredAlerts reads the calendar through the same cache the five-day schedule row
// uses, so polling clients never cost a Sonarr request of their own.
func (s *Server) sonarrAiredAlerts(ctx context.Context) []clientAlert {
if !s.sonarrEnabled(ctx) || s.cfg.SonarrAlertWindow <= 0 {
window := s.sonarrAlertWindow()
if !s.sonarrEnabled(ctx) || window <= 0 {
return nil
}
row, err := s.sonarrAiringTodayRow(ctx)
@@ -199,11 +200,7 @@ func (s *Server) sonarrAiredAlerts(ctx context.Context) []clientAlert {
}
items = append(items, item)
}
location := s.cfg.SonarrLocation
if location == nil {
location = time.Local
}
return buildSonarrAlerts(items, time.Now().In(location), s.cfg.SonarrAlertWindow)
return buildSonarrAlerts(items, time.Now().In(s.householdLocation()), window)
}
// buildSonarrAlerts announces episodes that have aired but are not in Emby yet — the