New: Speed up API add by reworking SeriesExistsValidator

pull/5770/head
Qstick 1 year ago
parent 51d6fd32dc
commit 5638f9c0a1

@ -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);
}
}
}

Loading…
Cancel
Save