@page @model IndexModel @{ ViewData["Title"] = "Airing Soon Anime"; }

🗓️ Airing Soon Anime @(Model.AiringShows == null ? "No data" : (Model.AiringShows.Count + (Model.AiringShows.Count == 1 ? " show" : " shows")))

Anime with an upcoming or recent latest episode, fetched from the TMDB cache. Sorted by air date (newest first).

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) { } @if (Model.AiringShows == null || Model.AiringShows.Count == 0) {
📺

No airing soon shows found

The Redis cache either returned no entries or the airing soon list is empty.

} else {
@foreach (var show in Model.AiringShows) {
@if (!string.IsNullOrWhiteSpace(show.PosterUrl)) { @show.Title } else {
🗂️
} @if (show.VoteAverage.HasValue && show.VoteAverage > 0) { ⭐ @string.Format("{0:0.0}", show.VoteAverage) } @if (show.EffectiveLastAirDate.HasValue) { @if (show.IsFuture) { Airs in @Math.Max(show.DaysUntil, 1)d } else { Aired @Math.Abs(show.DaysUntil)d ago } }
@show.Title
@if (show.LatestSeasonNumber.HasValue && show.LatestSeasonNumber > 0) { Season @show.LatestSeasonNumber } @if (show.LatestEpisodeNumber > 0) { @if (show.LastEpisodeNumber.HasValue && show.LastEpisodeNumber > 0) { Ep @show.LatestEpisodeNumber / @show.LastEpisodeNumber } else { Ep @show.LatestEpisodeNumber } } @if (show.LatestOrdinalEpisodeNumber.HasValue && show.LatestOrdinalEpisodeNumber > 0) { Total: @show.LatestOrdinalEpisodeNumber }
@if (show.EffectiveLastAirDate.HasValue) { 📅 Last air date: @show.AirDateFormatted } else { 📅 Last air date: @show.AirDateFormatted }
}
}