New: Speed up API add by reworking SeriesExistsValidator

This commit is contained in:
Qstick 2023-07-03 01:22:11 -05:00
parent 51d6fd32dc
commit 5638f9c0a1
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using System;
using System;
using System.Linq;
using FluentValidation.Validators;
using NzbDrone.Core.Tv;
@ -24,7 +25,7 @@ namespace NzbDrone.Core.Validation.Paths
var tvdbId = Convert.ToInt32(context.PropertyValue.ToString());
return !_seriesService.GetAllSeries().Exists(s => s.TvdbId == tvdbId);
return !_seriesService.AllSeriesTvdbIds().Any(s => s == tvdbId);
}
}
}