diff options
Diffstat (limited to 'Emby.Naming/AudioBook/AudioBookResolver.cs')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookResolver.cs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookResolver.cs b/Emby.Naming/AudioBook/AudioBookResolver.cs index ed53bd04f..5807d4688 100644 --- a/Emby.Naming/AudioBook/AudioBookResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookResolver.cs @@ -1,3 +1,4 @@ +#nullable enable #pragma warning disable CS1591 using System; @@ -16,21 +17,11 @@ namespace Emby.Naming.AudioBook _options = options; } - public AudioBookFileInfo ParseFile(string path) + public AudioBookFileInfo? Resolve(string path, bool isDirectory = false) { - return Resolve(path, false); - } - - public AudioBookFileInfo ParseDirectory(string path) - { - return Resolve(path, true); - } - - public AudioBookFileInfo Resolve(string path, bool isDirectory = false) - { - if (string.IsNullOrEmpty(path)) + if (path.Length == 0) { - throw new ArgumentNullException(nameof(path)); + throw new ArgumentException("String can't be empty.", nameof(path)); } // TODO |
