Skip to content

Commit

Permalink
fix: fix status for not-yet-ended shows
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Sep 25, 2023
1 parent bb2a285 commit 20e0a86
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Shokofin/Providers/SeriesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task<MetadataResult<Series>> GetMetadata(SeriesInfo info, Cancellat
PremiereDate = season.TvDB.AirDate,
EndDate = season.TvDB.EndDate,
ProductionYear = season.TvDB.AirDate?.Year,
Status = season.TvDB.EndDate == null ? SeriesStatus.Continuing : SeriesStatus.Ended,
Status = !season.TvDB.EndDate.HasValue || season.TvDB.EndDate.Value > DateTime.UtcNow ? SeriesStatus.Continuing : SeriesStatus.Ended,
Tags = season.Tags.ToArray(),
Genres = season.Genres.ToArray(),
Studios = season.Studios.ToArray(),
Expand All @@ -93,7 +93,7 @@ public async Task<MetadataResult<Series>> GetMetadata(SeriesInfo info, Cancellat
PremiereDate = premiereDate,
ProductionYear = premiereDate?.Year,
EndDate = endDate,
Status = endDate == null ? SeriesStatus.Continuing : SeriesStatus.Ended,
Status = !endDate.HasValue || endDate.Value > DateTime.UtcNow ? SeriesStatus.Continuing : SeriesStatus.Ended,
Tags = show.Tags.ToArray(),
Genres = show.Genres.ToArray(),
Studios = show.Studios.ToArray(),
Expand All @@ -104,7 +104,6 @@ public async Task<MetadataResult<Series>> GetMetadata(SeriesInfo info, Cancellat
AddProviderIds(result.Item, season.Id, show.Id, season.AniDB.Id.ToString());
}


result.HasMetadata = true;

result.ResetPeople();
Expand Down

0 comments on commit 20e0a86

Please sign in to comment.