mirror of https://github.com/lidarr/Lidarr
New: Speed up API add by reworking ArtistExistsValidator
Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
parent
285323ae0b
commit
19f6433829
|
@ -21,7 +21,9 @@ namespace NzbDrone.Core.Validation.Paths
|
|||
return true;
|
||||
}
|
||||
|
||||
return !_artistService.GetAllArtists().Exists(s => s.Metadata.Value.ForeignArtistId == context.PropertyValue.ToString());
|
||||
var foreignArtistId = context.PropertyValue.ToString();
|
||||
|
||||
return _artistService.FindById(foreignArtistId) == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue