diff options
| author | martinek-stepan <68327580+martinek-stepan@users.noreply.github.com> | 2020-11-12 16:51:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 16:51:52 +0100 |
| commit | 4bfcc8b0d15a76d9d33e038cc4e5590fc1016750 (patch) | |
| tree | 9966eda02cc53aed1c3c411df08d217404a44346 | |
| parent | b66239fd521150078d96314e58c61d09ea2888ae (diff) | |
Update Emby.Naming/AudioBook/AudioBookListResolver.cs
Use StringComparison.OrdinalIgnoreCase when comparing names
Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookListResolver.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookListResolver.cs b/Emby.Naming/AudioBook/AudioBookListResolver.cs index 95817efc3..e9ea9b7a5 100644 --- a/Emby.Naming/AudioBook/AudioBookListResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookListResolver.cs @@ -140,8 +140,8 @@ namespace Emby.Naming.AudioBook private AudioBookFileInfo FindMainAudioBookFile(List<AudioBookFileInfo> files, string name) { - var main = files.Find(x => Path.GetFileNameWithoutExtension(x.Path).Equals(name)); - main ??= files.FirstOrDefault(x => Path.GetFileNameWithoutExtension(x.Path).Equals("audiobook")); + var main = files.Find(x => Path.GetFileNameWithoutExtension(x.Path).Equals(name, StringComparison.OrdinalIgnoreCase)); + main ??= files.FirstOrDefault(x => Path.GetFileNameWithoutExtension(x.Path).Equals("audiobook", StringComparison.OrdinalIgnoreCase)); main ??= files.OrderBy(x => x.Container) .ThenBy(x => x.Path) .First(); |
