Fix more warnings

This commit is contained in:
Bond-009
2019-05-10 20:37:42 +02:00
parent 2aed2d164b
commit a6f9ceedd8
41 changed files with 356 additions and 254 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
@@ -14,14 +15,13 @@ namespace Emby.Naming.AudioBook
_options = options;
}
public AudioBookFilePathParserResult Parse(string path, bool IsDirectory)
public AudioBookFilePathParserResult Parse(string path)
{
var result = Parse(path);
return !result.Success ? new AudioBookFilePathParserResult() : result;
}
if (path == null)
{
throw new ArgumentNullException(nameof(path));
}
private AudioBookFilePathParserResult Parse(string path)
{
var result = new AudioBookFilePathParserResult();
var fileName = Path.GetFileNameWithoutExtension(path);
foreach (var expression in _options.AudioBookPartsExpressions)
@@ -40,6 +40,7 @@ namespace Emby.Naming.AudioBook
}
}
}
if (!result.PartNumber.HasValue)
{
var value = match.Groups["part"];