From 924e7c89f33880ccdd738da9ca62512c5eaa8d69 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 3 Feb 2018 21:22:14 +0000 Subject: [PATCH] FIXED PLEX!!!!! --- src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs index ed1a035d9..7750b6487 100644 --- a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs +++ b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs @@ -120,12 +120,23 @@ namespace Ombi.Schedule.Jobs.Plex PlexContentId = show.ratingKey }); } - + // Do we already have this item? // Let's try and match var existingContent = await Repo.GetFirstContentByCustom(x => x.Title == show.title && x.ReleaseYear == show.year.ToString() && x.Type == PlexMediaTypeEntity.Show); + + if (existingContent == null) + { + // Just check the key + var hasSameKey = await Repo.GetByKey(show.ratingKey); + if (hasSameKey != null) + { + existingContent = hasSameKey; + } + + } // The ratingKey keeps changing... //var existingContent = await Repo.GetByKey(show.ratingKey); if (existingContent != null)