!wip just some small minor improvements

pull/2842/head
tidusjar 6 years ago
parent 9a9357d518
commit bd06af8ca0

@ -24,7 +24,7 @@ namespace Ombi.Core.Rule.Rules.Search
if (!airedButNotAvailable)
{
var unairedEpisodes = search.SeasonRequests.Any(x =>
x.Episodes.Any(c => !c.Available && c.AirDate > DateTime.Now.Date));
x.Episodes.Any(c => !c.Available && c.AirDate > DateTime.Now.Date && c.AirDate != DateTime.MinValue));
if (unairedEpisodes)
{
search.FullyAvailable = true;
@ -41,21 +41,21 @@ namespace Ombi.Core.Rule.Rules.Search
{
epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber &&
x.Series.ImdbId == item.ImdbId.ToString());
x.Series.ImdbId.Equals(item.ImdbId.ToString(), StringComparison.InvariantCultureIgnoreCase));
}
if (useTheMovieDb)
{
epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber &&
x.Series.TheMovieDbId == item.TheMovieDbId.ToString());
x.Series.TheMovieDbId.Equals(item.TheMovieDbId.ToString(), StringComparison.InvariantCultureIgnoreCase));
}
if (useTvDb)
{
epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber &&
x.Series.TvDbId == item.TvDbId.ToString());
x.Series.TvDbId.Equals(item.TvDbId.ToString(), StringComparison.InvariantCultureIgnoreCase));
}
if (epExists != null)
@ -71,21 +71,21 @@ namespace Ombi.Core.Rule.Rules.Search
{
epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber &&
x.Series.ImdbId == item.ImdbId.ToString());
x.Series.ImdbId.Equals(item.ImdbId.ToString(), StringComparison.InvariantCultureIgnoreCase));
}
if (useTheMovieDb)
{
epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber &&
x.Series.TheMovieDbId == item.TheMovieDbId.ToString());
x.Series.TheMovieDbId.Equals(item.TheMovieDbId.ToString(), StringComparison.InvariantCultureIgnoreCase));
}
if (useTvDb)
{
epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber &&
x.Series.TvDbId == item.TvDbId.ToString());
x.Series.TvDbId.Equals(item.TvDbId.ToString(), StringComparison.InvariantCultureIgnoreCase));
}
if (epExists != null)

Loading…
Cancel
Save