mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-25 11:13:39 +02:00
New: Speed up API add by reworking SeriesExistsValidator
This commit is contained in:
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…
x
Reference in New Issue
Block a user