mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-06 08:46:34 +00:00
Better way to fix empty string split results
This commit is contained in:
@@ -37,12 +37,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
return true;
|
||||
}
|
||||
|
||||
var restrictions = restrictionsString.Split('\n');
|
||||
var restrictions = restrictionsString.Split(new []{ '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var restriction in restrictions)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(restriction)) continue;
|
||||
|
||||
if (subject.Release.Title.ToLowerInvariant().Contains(restriction.ToLowerInvariant()))
|
||||
{
|
||||
_logger.Trace("{0} is restricted: {1}", subject, restriction);
|
||||
|
||||
Reference in New Issue
Block a user