Skip to content

Commit

Permalink
Disallow EndDates that are Before AirDates from Bad Parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Jan 23, 2024
1 parent 877c6a2 commit 7a37c24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Shoko.Server/Providers/AniDB/HTTP/HttpAnimeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ private static void ParseDates(XmlNode docAnime, ResponseAnime anime)
{
anime.EndDate = date;
}

if (anime.EndDate != null && anime.AirDate != null && anime.EndDate < anime.AirDate) anime.EndDate = anime.AirDate;
}

anime.BeginYear = anime.AirDate?.Year ?? 0;
Expand Down

0 comments on commit 7a37c24

Please sign in to comment.