From 57c42bcc41eeedc0ceef4c0e486d33efcca97ce7 Mon Sep 17 00:00:00 2001 From: chrispr Date: Tue, 8 Oct 2024 17:33:41 -0400 Subject: [PATCH] Changed season finale logic to only print when the episode was actually changed --- AnimeAnnouncer/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AnimeAnnouncer/Program.cs b/AnimeAnnouncer/Program.cs index cfab0d6..4c03939 100644 --- a/AnimeAnnouncer/Program.cs +++ b/AnimeAnnouncer/Program.cs @@ -153,7 +153,7 @@ namespace AnimeAnnouncer var seasonFinale = latestSeasonDetail.Episodes.LastOrDefault(e => e.EpisodeType.Equals("finale", StringComparison.InvariantCultureIgnoreCase)); - if(seasonFinale != null) + if(seasonFinale != null && seasonFinale.EpisodeNumber != latestEpisodeNumber) { Console.WriteLine($"Overriding previous finale choice of {latestEpisodeNumber} due to season detail response where it's {seasonFinale.EpisodeNumber}"); latestEpisodeNumber = seasonFinale.EpisodeNumber;