mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Fixed build
This commit is contained in:
parent
6d5a823353
commit
89ca7596c0
2 changed files with 6 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue