diff options
| author | martinek-stepan <68327580+martinek-stepan@users.noreply.github.com> | 2020-11-12 12:54:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 12:54:55 +0100 |
| commit | 496923719c405cd9b0386f7d31fcb204cdaeb9c4 (patch) | |
| tree | 2aacbb9a7f06dc8bcee9b6692923bb2bc68ddbd9 /Emby.Naming/AudioBook | |
| parent | 195a6261c49f2f1376794a149ddec0a56cbe230a (diff) | |
Apply suggestions from code review
Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
Diffstat (limited to 'Emby.Naming/AudioBook')
| -rw-r--r-- | Emby.Naming/AudioBook/AudioBookListResolver.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookListResolver.cs b/Emby.Naming/AudioBook/AudioBookListResolver.cs index b203f9902..54c1fe5bd 100644 --- a/Emby.Naming/AudioBook/AudioBookListResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookListResolver.cs @@ -33,7 +33,7 @@ namespace Emby.Naming.AudioBook { var audioBookResolver = new AudioBookResolver(_options); - // File with empty fullname will be sorted out here + // File with empty fullname will be sorted out here. var audiobookFileInfos = files .Select(i => audioBookResolver.Resolve(i.FullName)) .OfType<AudioBookFileInfo>() @@ -139,8 +139,8 @@ namespace Emby.Naming.AudioBook private AudioBookFileInfo FindMainAudioBookFile(List<AudioBookFileInfo> files, string name) { - var main = files.Find(x => Path.GetFileNameWithoutExtension(x.Path) == name); - main ??= files.FirstOrDefault(x => Path.GetFileNameWithoutExtension(x.Path) == "audiobook"); + var main = files.Find(x => Path.GetFileNameWithoutExtension(x.Path).Equals(name)); + main ??= files.FirstOrDefault(x => Path.GetFileNameWithoutExtension(x.Path).Equals("audiobook")); main ??= files.OrderBy(x => x.Container) .ThenBy(x => x.Path) .First(); |
