Series drill-down: mark downloading episodes and seasons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -129,7 +129,7 @@ func TestSeriesRowDetail(t *testing.T) {
|
||||
s := sonarr.Series{Title: "Andor", Year: 2022, Network: "Disney+", Status: "ended", Overview: "Series plot"}
|
||||
|
||||
// A season: the summary and the series plot.
|
||||
d := seriesRowDetail(s, nil, 2, seasonSummary{number: 2, total: 12, have: 5}, true, "2026-01-01")
|
||||
d := seriesRowDetail(s, nil, 2, seasonSummary{number: 2, total: 12, have: 5}, true, "2026-01-01", dlInfo{})
|
||||
for _, want := range []string{"Andor", "(2022)", "Disney+", "Season 2", "5 of 12 episodes", "Monitored: yes"} {
|
||||
if !strings.Contains(d.head, want) {
|
||||
t.Errorf("season head missing %q:\n%s", want, d.head)
|
||||
@@ -141,7 +141,7 @@ func TestSeriesRowDetail(t *testing.T) {
|
||||
|
||||
// An episode: its own title, air date, status and plot.
|
||||
ep := &sonarr.Episode{SeasonNumber: 2, EpisodeNumber: 5, Title: "Welcome [Home]", AirDate: "2025-05-01", HasFile: true, Monitored: true, Overview: "Episode plot"}
|
||||
d = seriesRowDetail(s, ep, 2, seasonSummary{}, true, "2026-01-01")
|
||||
d = seriesRowDetail(s, ep, 2, seasonSummary{}, true, "2026-01-01", dlInfo{})
|
||||
for _, want := range []string{"S02E05 Welcome [Home[]", "Aired: 2025-05-01", "downloaded"} {
|
||||
if !strings.Contains(d.head, want) {
|
||||
t.Errorf("episode head missing %q:\n%s", want, d.head)
|
||||
@@ -152,7 +152,7 @@ func TestSeriesRowDetail(t *testing.T) {
|
||||
}
|
||||
// Without an episode plot the series plot stays.
|
||||
ep.Overview = ""
|
||||
if d := seriesRowDetail(s, ep, 2, seasonSummary{}, true, "2026-01-01"); d.plot != "Series plot" {
|
||||
if d := seriesRowDetail(s, ep, 2, seasonSummary{}, true, "2026-01-01", dlInfo{}); d.plot != "Series plot" {
|
||||
t.Errorf("fallback plot = %q", d.plot)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user