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)

pull/158/head
Drewster727 9 years ago
parent 4c6c0ae900
commit 1fbe29af10

@ -199,7 +199,9 @@ namespace PlexRequests.Services
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<PlexAlbum> GetPlexAlbums()

Loading…
Cancel
Save