0.2.63 update

This commit is contained in:
ponzischeme89
2026-08-14 11:47:32 +12:00
parent 9a8ecbdceb
commit 06b6490ac9
41 changed files with 921 additions and 179 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ const sonarrScheduleDays = 5
// Every failure degrades to asking Sonarr directly: a cache that is down must cost latency,
// never the answer.
func (s *Server) sonarrSeriesCatalogue(ctx context.Context) ([]sonarr.Series, error) {
if s.sonarr == nil {
if !s.sonarrEnabled(ctx) {
return nil, fmt.Errorf("sonarr: not configured")
}
if series := s.cachedSonarrSeries(ctx); series != nil {
@@ -95,7 +95,7 @@ type prerollScheduleEntry struct {
}
func (s *Server) handlePreroll(w http.ResponseWriter, r *http.Request, _ store.Session) {
if s.sonarr == nil {
if !s.sonarrEnabled(r.Context()) {
writeJSON(w, http.StatusOK, emptyPrerollSchedule())
return
}
@@ -340,7 +340,7 @@ func (index seriesIndex) logo(title string, year int) (string, string) {
}
func (s *Server) sonarrAiringTodayRow(ctx context.Context) (*recommend.Row, error) {
if s.sonarr == nil {
if !s.sonarrEnabled(ctx) {
return nil, nil
}
location := s.cfg.SonarrLocation