Fixed the issue where we have got an episode but not the related series. #1620

pull/1634/head
tidusjar 7 years ago
parent 80ea579292
commit 7e4de5cbd7

@ -89,6 +89,15 @@ namespace Ombi.Schedule.Jobs.Emby
continue;
}
// Let's make sure we have the parent request, stop those pesky forign key errors,
// Damn me having data integrity
var parent = await _repo.GetByEmbyId(epInfo.SeriesId);
if (parent == null)
{
_logger.LogInformation("The episode {0} does not relate to a series, so we cannot save this", ep.Name);
continue;
}
var existingEpisode = await _repo.GetByEmbyId(ep.Id);
if (existingEpisode == null)
{

Loading…
Cancel
Save