1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Fix: Remove title requirement in the API for adding movies when the TMDb is provided since that will over-ride the given title.

This commit is contained in:
nitsua 2020-08-28 23:56:13 -04:00 committed by Qstick
parent 0800029713
commit 84e769b14e
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ public MovieModule(IBroadcastSignalRMessage signalRBroadcaster,
PostValidator.RuleFor(s => s.RootFolderPath)
.IsValidPath()
.When(s => s.Path.IsNullOrWhiteSpace());
PostValidator.RuleFor(s => s.Title).NotEmpty();
PostValidator.RuleFor(s => s.Title).NotEmpty().When(s => s.TmdbId <= 0);
PostValidator.RuleFor(s => s.TmdbId).NotNull().NotEmpty().SetValidator(moviesExistsValidator);
PutValidator.RuleFor(s => s.Path).IsValidPath();

View File

@ -92,7 +92,7 @@ public MovieModule(IBroadcastSignalRMessage signalRBroadcaster,
.IsValidPath()
.SetValidator(movieFolderAsRootFolderValidator)
.When(s => s.Path.IsNullOrWhiteSpace());
PostValidator.RuleFor(s => s.Title).NotEmpty();
PostValidator.RuleFor(s => s.Title).NotEmpty().When(s => s.TmdbId <= 0);
PostValidator.RuleFor(s => s.TmdbId).NotNull().NotEmpty().SetValidator(moviesExistsValidator);
PutValidator.RuleFor(s => s.Path).IsValidPath();