Skip to content

Commit

Permalink
Updated: TMDbSettings.cs to allow pipe for or for genre ids (#2389)
Browse files Browse the repository at this point in the history
  • Loading branch information
crhammock authored and galli-leo committed Jan 11, 2018
1 parent 663ac97 commit da425b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/NzbDrone.Core/NetImport/TMDb/TMDbSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ public TMDbSettingsValidator()
RuleFor(c => c.Ceritification)
.Matches(@"^\bNR\b|\bG\b|\bPG\b|\bPG\-13\b|\bR\b|\bNC\-17\b$", RegexOptions.IgnoreCase)
.When(c => c.Ceritification.IsNotNullOrWhiteSpace())
.WithMessage("Not a valid cerification");
.WithMessage("Not a valid certification");

// CSV of numbers
RuleFor(c => c.IncludeGenreIds)
.Matches(@"^\d+([,]\d+)*$", RegexOptions.IgnoreCase)
.Matches(@"^\d+([,|]\d+)*$", RegexOptions.IgnoreCase)
.When(c => c.IncludeGenreIds.IsNotNullOrWhiteSpace())
.WithMessage("Genre Ids must be comma separated number ids");
.WithMessage("Genre Ids must be comma (,) or pipe (|) separated number ids");

// CSV of numbers
RuleFor(c => c.ExcludeGenreIds)
.Matches(@"^\d+([,]\d+)*$", RegexOptions.IgnoreCase)
.Matches(@"^\d+([,|]\d+)*$", RegexOptions.IgnoreCase)
.When(c => c.ExcludeGenreIds.IsNotNullOrWhiteSpace())
.WithMessage("Genre Ids must be comma separated number ids");
.WithMessage("Genre Ids must be comma (,) or pipe (|) separated number ids");

}
}
Expand Down Expand Up @@ -99,4 +99,4 @@ public NzbDroneValidationResult Validate()
}
}

}
}

0 comments on commit da425b0

Please sign in to comment.