Fixed build

pull/1741/head
tidusjar 7 years ago
parent 6d5a823353
commit 89ca7596c0

@ -83,7 +83,7 @@ namespace Ombi.Schedule.Jobs.Emby
NotificationType = NotificationType.RequestAvailable,
RequestId = movie.Id,
RequestType = RequestType.Movie,
Recipient = movie.RequestedUser.Email,
Recipient = movie.RequestedUser.Email.HasValue() ? movie.RequestedUser.Email : string.Empty,
}));
}
}

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Hangfire;
@ -59,20 +60,20 @@ namespace Ombi.Schedule.Jobs.Plex
var tvDbId = child.ParentRequest.TvDbId;
var imdbId = child.ParentRequest.ImdbId;
IQueryable<PlexEpisode> seriesEpisodes = null;
List<PlexEpisode> seriesEpisodes = null;
if (useImdb)
{
seriesEpisodes = plexEpisodes.Where(x => x.Series.ImdbId == imdbId.ToString());
seriesEpisodes = plexEpisodes.Where(x => x.Series.ImdbId == imdbId.ToString()).ToList();
}
if (useTvDb)
{
seriesEpisodes = plexEpisodes.Where(x => x.Series.TvDbId == tvDbId.ToString());
seriesEpisodes = plexEpisodes.Where(x => x.Series.TvDbId == tvDbId.ToString()).ToList();
}
foreach (var season in child.SeasonRequests)
{
foreach (var episode in season.Episodes)
{
var foundEp = await seriesEpisodes.FirstOrDefaultAsync(
var foundEp = seriesEpisodes.FirstOrDefault(
x => x.EpisodeNumber == episode.EpisodeNumber &&
x.SeasonNumber == episode.Season.SeasonNumber);

Loading…
Cancel
Save