Minor error message tweak (#1778)

* Added: some tips to how to build. Gave some info to Windows developers.

* Fixed: Alignment of validation errors in labels

* Fixed: error message mentioning 'series'
pull/2/head
Oliver Rivett-Carnac 7 years ago committed by Devin Buhl
parent dffa50a82f
commit b313dd1845

@ -115,10 +115,17 @@ Radarr is currently undergoing rapid development and pull requests are actively
> **Notice** > **Notice**
> Gulp must be running at all times while you are working with Radarr client source files. > Gulp must be running at all times while you are working with Radarr client source files.
### Build
* To build run `sh build.sh`
**Note:** Windows users must have bash available to do this. [cmder](http://cmder.net/) which is a console emulator for windows has bash as part of it's default installation.
### Development ### Development
* Open `NzbDrone.sln` in Visual Studio or run the build.sh script, if Mono is installed * Open `NzbDrone.sln` in Visual Studio or run the build.sh script, if Mono is installed
* Make sure `NzbDrone.Console` is set as the startup project * Make sure `NzbDrone.Console` is set as the startup project
* Run `build.sh` before running
### License ### License

@ -1,27 +1,27 @@
using FluentValidation.Validators; using FluentValidation.Validators;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Validation.Paths namespace NzbDrone.Core.Validation.Paths
{ {
public class MoviePathValidator : PropertyValidator public class MoviePathValidator : PropertyValidator
{ {
private readonly IMovieService _seriesService; private readonly IMovieService _moviesService;
public MoviePathValidator(IMovieService seriesService) public MoviePathValidator(IMovieService moviesService)
: base("Path is already configured for another series") : base("Path is already configured for another movie")
{ {
_seriesService = seriesService; _moviesService = moviesService;
} }
protected override bool IsValid(PropertyValidatorContext context) protected override bool IsValid(PropertyValidatorContext context)
{ {
if (context.PropertyValue == null) return true; if (context.PropertyValue == null) return true;
dynamic instance = context.ParentContext.InstanceToValidate; dynamic instance = context.ParentContext.InstanceToValidate;
var instanceId = (int)instance.Id; var instanceId = (int)instance.Id;
return (!_seriesService.GetAllMovies().Exists(s => s.Path.PathEquals(context.PropertyValue.ToString()) && s.Id != instanceId)); return (!_moviesService.GetAllMovies().Exists(s => s.Path.PathEquals(context.PropertyValue.ToString()) && s.Id != instanceId));
} }
} }
} }

@ -41,8 +41,7 @@
.help-inline { .help-inline {
display : inline-block; display : inline-block;
margin-top : 8px; padding-left : 0px;
padding-left : 0;
@media (max-width: @screen-xs-max) { @media (max-width: @screen-xs-max) {
margin-left: 0; margin-left: 0;

Loading…
Cancel
Save