|
|
@ -35,20 +35,19 @@ namespace Lidarr.Api.V1.Artist
|
|
|
|
private readonly IAddArtistService _addArtistService;
|
|
|
|
private readonly IAddArtistService _addArtistService;
|
|
|
|
private readonly IArtistStatisticsService _artistStatisticsService;
|
|
|
|
private readonly IArtistStatisticsService _artistStatisticsService;
|
|
|
|
private readonly IMapCoversToLocal _coverMapper;
|
|
|
|
private readonly IMapCoversToLocal _coverMapper;
|
|
|
|
private readonly IAlbumService _albumService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ArtistModule(IBroadcastSignalRMessage signalRBroadcaster,
|
|
|
|
public ArtistModule(IBroadcastSignalRMessage signalRBroadcaster,
|
|
|
|
IArtistService artistService,
|
|
|
|
IArtistService artistService,
|
|
|
|
IAddArtistService addArtistService,
|
|
|
|
IAddArtistService addArtistService,
|
|
|
|
IArtistStatisticsService artistStatisticsService,
|
|
|
|
IArtistStatisticsService artistStatisticsService,
|
|
|
|
IMapCoversToLocal coverMapper,
|
|
|
|
IMapCoversToLocal coverMapper,
|
|
|
|
IAlbumService albumService,
|
|
|
|
|
|
|
|
RootFolderValidator rootFolderValidator,
|
|
|
|
RootFolderValidator rootFolderValidator,
|
|
|
|
ArtistPathValidator artistPathValidator,
|
|
|
|
ArtistPathValidator artistPathValidator,
|
|
|
|
ArtistExistsValidator artistExistsValidator,
|
|
|
|
ArtistExistsValidator artistExistsValidator,
|
|
|
|
ArtistAncestorValidator artistAncestorValidator,
|
|
|
|
ArtistAncestorValidator artistAncestorValidator,
|
|
|
|
ProfileExistsValidator profileExistsValidator,
|
|
|
|
ProfileExistsValidator profileExistsValidator,
|
|
|
|
LanguageProfileExistsValidator languageProfileExistsValidator
|
|
|
|
LanguageProfileExistsValidator languageProfileExistsValidator,
|
|
|
|
|
|
|
|
MetadataProfileExistsValidator metadataProfileExistsValidator
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: base(signalRBroadcaster)
|
|
|
|
: base(signalRBroadcaster)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -57,7 +56,6 @@ namespace Lidarr.Api.V1.Artist
|
|
|
|
_artistStatisticsService = artistStatisticsService;
|
|
|
|
_artistStatisticsService = artistStatisticsService;
|
|
|
|
|
|
|
|
|
|
|
|
_coverMapper = coverMapper;
|
|
|
|
_coverMapper = coverMapper;
|
|
|
|
_albumService = albumService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetResourceAll = AllArtists;
|
|
|
|
GetResourceAll = AllArtists;
|
|
|
|
GetResourceById = GetArtist;
|
|
|
|
GetResourceById = GetArtist;
|
|
|
@ -77,6 +75,7 @@ namespace Lidarr.Api.V1.Artist
|
|
|
|
|
|
|
|
|
|
|
|
SharedValidator.RuleFor(s => s.QualityProfileId).SetValidator(profileExistsValidator);
|
|
|
|
SharedValidator.RuleFor(s => s.QualityProfileId).SetValidator(profileExistsValidator);
|
|
|
|
SharedValidator.RuleFor(s => s.LanguageProfileId).SetValidator(languageProfileExistsValidator);
|
|
|
|
SharedValidator.RuleFor(s => s.LanguageProfileId).SetValidator(languageProfileExistsValidator);
|
|
|
|
|
|
|
|
SharedValidator.RuleFor(s => s.MetadataProfileId).SetValidator(metadataProfileExistsValidator);
|
|
|
|
|
|
|
|
|
|
|
|
PostValidator.RuleFor(s => s.Path).IsValidPath().When(s => s.RootFolderPath.IsNullOrWhiteSpace());
|
|
|
|
PostValidator.RuleFor(s => s.Path).IsValidPath().When(s => s.RootFolderPath.IsNullOrWhiteSpace());
|
|
|
|
PostValidator.RuleFor(s => s.RootFolderPath).IsValidPath().When(s => s.Path.IsNullOrWhiteSpace());
|
|
|
|
PostValidator.RuleFor(s => s.RootFolderPath).IsValidPath().When(s => s.Path.IsNullOrWhiteSpace());
|
|
|
|