mirror of
https://github.com/Radarr/Radarr
synced 2025-10-06 02:32:53 +02: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:
@@ -75,7 +75,7 @@ namespace NzbDrone.Api.Movies
|
||||
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();
|
||||
|
@@ -92,7 +92,7 @@ namespace Radarr.Api.V3.Movies
|
||||
.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();
|
||||
|
Reference in New Issue
Block a user