0.2.67 - Detail pages improvements
This commit is contained in:
@@ -416,7 +416,7 @@ func buildSonarrRow(
|
||||
dayStart := localDayStart(now, location)
|
||||
windowEnd := dayStart.AddDate(0, 0, sonarrScheduleDays)
|
||||
for _, episode := range episodes {
|
||||
if episode.AirDateUTC == nil {
|
||||
if episode.AirDateUTC == nil || !scheduleShowFollowed(episode) {
|
||||
continue
|
||||
}
|
||||
localAirTime := episode.AirDateUTC.In(location)
|
||||
@@ -438,6 +438,18 @@ func buildSonarrRow(
|
||||
}, nil
|
||||
}
|
||||
|
||||
// scheduleShowFollowed answers whether a show is one the household is actually waiting
|
||||
// for. Sonarr's calendar is asked with unmonitored=true — the calendar page and the aired
|
||||
// banners both want the whole picture — but the launcher row answers "what is coming",
|
||||
// and an unmonitored show is never coming. Absence of a series record is not evidence of
|
||||
// anything, so an episode carrying no expanded series is kept rather than dropped.
|
||||
func scheduleShowFollowed(episode sonarr.Episode) bool {
|
||||
if episode.Series.ID <= 0 {
|
||||
return true
|
||||
}
|
||||
return episode.Series.Monitored
|
||||
}
|
||||
|
||||
func toSonarrScheduleItem(
|
||||
episode sonarr.Episode,
|
||||
now time.Time,
|
||||
|
||||
Reference in New Issue
Block a user