mirror of
https://github.com/Radarr/Radarr
synced 2025-03-12 07:05:08 +00:00
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'
This commit is contained in:
parent
dffa50a82f
commit
b313dd1845
3 changed files with 34 additions and 28 deletions
|
@ -115,10 +115,17 @@ Radarr is currently undergoing rapid development and pull requests are actively
|
|||
> **Notice**
|
||||
> 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
|
||||
|
||||
* 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
|
||||
* Run `build.sh` before running
|
||||
|
||||
### License
|
||||
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
using FluentValidation.Validators;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Validation.Paths
|
||||
{
|
||||
public class MoviePathValidator : PropertyValidator
|
||||
{
|
||||
private readonly IMovieService _seriesService;
|
||||
|
||||
public MoviePathValidator(IMovieService seriesService)
|
||||
: base("Path is already configured for another series")
|
||||
{
|
||||
_seriesService = seriesService;
|
||||
}
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
if (context.PropertyValue == null) return true;
|
||||
|
||||
dynamic instance = context.ParentContext.InstanceToValidate;
|
||||
var instanceId = (int)instance.Id;
|
||||
|
||||
return (!_seriesService.GetAllMovies().Exists(s => s.Path.PathEquals(context.PropertyValue.ToString()) && s.Id != instanceId));
|
||||
}
|
||||
}
|
||||
using FluentValidation.Validators;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Validation.Paths
|
||||
{
|
||||
public class MoviePathValidator : PropertyValidator
|
||||
{
|
||||
private readonly IMovieService _moviesService;
|
||||
|
||||
public MoviePathValidator(IMovieService moviesService)
|
||||
: base("Path is already configured for another movie")
|
||||
{
|
||||
_moviesService = moviesService;
|
||||
}
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
if (context.PropertyValue == null) return true;
|
||||
|
||||
dynamic instance = context.ParentContext.InstanceToValidate;
|
||||
var instanceId = (int)instance.Id;
|
||||
|
||||
return (!_moviesService.GetAllMovies().Exists(s => s.Path.PathEquals(context.PropertyValue.ToString()) && s.Id != instanceId));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -41,8 +41,7 @@
|
|||
|
||||
.help-inline {
|
||||
display : inline-block;
|
||||
margin-top : 8px;
|
||||
padding-left : 0;
|
||||
padding-left : 0px;
|
||||
|
||||
@media (max-width: @screen-xs-max) {
|
||||
margin-left: 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue