From 1fbe29af1063e4321dde657fc40d30df4be4e5ee Mon Sep 17 00:00:00 2001 From: Drewster727 Date: Thu, 14 Apr 2016 23:13:32 -0500 Subject: [PATCH] add an extra check when determining if a tv show is already available (also check if it starts with the show name returned from the tv db) --- PlexRequests.Services/PlexAvailabilityChecker.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PlexRequests.Services/PlexAvailabilityChecker.cs b/PlexRequests.Services/PlexAvailabilityChecker.cs index 40da825be..c4caa18a0 100644 --- a/PlexRequests.Services/PlexAvailabilityChecker.cs +++ b/PlexRequests.Services/PlexAvailabilityChecker.cs @@ -199,7 +199,9 @@ public List GetPlexTvShows() public bool IsTvShowAvailable(PlexTvShow[] plexShows, string title, string year) { - return plexShows.Any(x => x.Title.Equals(title, StringComparison.CurrentCultureIgnoreCase) && x.ReleaseYear.Equals(year, StringComparison.CurrentCultureIgnoreCase)); + return plexShows.Any(x => + (x.Title.Equals(title, StringComparison.CurrentCultureIgnoreCase) || x.Title.StartsWith(title, StringComparison.CurrentCultureIgnoreCase)) && + x.ReleaseYear.Equals(year, StringComparison.CurrentCultureIgnoreCase)); } public List GetPlexAlbums()