Fixed build

This commit is contained in:
tidusjar 2017-11-17 22:58:09 +00:00
commit 89ca7596c0
2 changed files with 6 additions and 5 deletions

View file

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

View file

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