diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-09-20 14:02:41 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-09-20 14:02:41 +0200 |
| commit | 228b33a23bfe21c3601933ad3168a2e590f4f430 (patch) | |
| tree | 79c6264901152f5a0d3ede4823b913bee6d27e37 /Emby.Naming/AudioBook | |
| parent | 3b006cd67429a694471413a61a5021339e28afb5 (diff) | |
Minor improvements
Diffstat (limited to 'Emby.Naming/AudioBook')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookFilePathParser.cs | 9 | ||||
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index eb9393b0b..14edd6492 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -1,6 +1,6 @@ +#nullable enable #pragma warning disable CS1591 -using System; using System.Globalization; using System.IO; using System.Text.RegularExpressions; @@ -19,12 +19,7 @@ namespace Emby.Naming.AudioBook public AudioBookFilePathParserResult Parse(string path) { - if (path == null) - { - throw new ArgumentNullException(nameof(path)); - } - - var result = new AudioBookFilePathParserResult(); + AudioBookFilePathParserResult result = default; var fileName = Path.GetFileNameWithoutExtension(path); foreach (var expression in _options.AudioBookPartsExpressions) { diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs index e28a58db7..7bfc4479d 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs @@ -1,8 +1,9 @@ +#nullable enable #pragma warning disable CS1591 namespace Emby.Naming.AudioBook { - public class AudioBookFilePathParserResult + public struct AudioBookFilePathParserResult { public int? PartNumber { get; set; } |
