diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2026-05-12 22:47:29 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2026-05-12 22:48:48 +0200 |
| commit | 7f5ff3dabd55fd4640b97eb3c5983c6b9a643901 (patch) | |
| tree | e23dfdf4e2878394efc88f4a9e9047abf68018ae | |
| parent | d5bb7756f1fb656de5ab53253008212557667399 (diff) | |
Address review comments
| -rw-r--r-- | Emby.Naming/Video/VideoListResolver.cs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs index 99a73c224d..7f25441076 100644 --- a/Emby.Naming/Video/VideoListResolver.cs +++ b/Emby.Naming/Video/VideoListResolver.cs @@ -16,6 +16,8 @@ namespace Emby.Naming.Video /// </summary> public partial class VideoListResolver { + private static readonly StringComparer _numericOrdinalComparer = StringComparer.Create(CultureInfo.InvariantCulture, CompareOptions.NumericOrdering); + private readonly NamingOptions _namingOptions; private readonly EpisodePathParser _episodePathParser; @@ -215,12 +217,6 @@ namespace Emby.Naming.Video for (var i = 0; i < videos.Count; i++) { var video = videos[i]; - if (video.ExtraType is not null) - { - result.Add(video); - continue; - } - var episodeResult = _episodePathParser.Parse(video.Files[0].Path, false); string? key = null; if (episodeResult.Success) @@ -284,19 +280,18 @@ namespace Emby.Naming.Video videos = []; - StringComparer comparer = StringComparer.Create(CultureInfo.InvariantCulture, CompareOptions.NumericOrdering); foreach (var group in groups) { if (group.Key) { videos.InsertRange(0, group - .OrderByDescending(x => x.resolutionMatch.Value, comparer) - .ThenBy(x => x.filename, comparer) + .OrderByDescending(x => x.resolutionMatch.Value, _numericOrdinalComparer) + .ThenBy(x => x.filename, _numericOrdinalComparer) .Select(x => x.value)); } else { - videos.AddRange(group.OrderBy(x => x.filename, comparer).Select(x => x.value)); + videos.AddRange(group.OrderBy(x => x.filename, _numericOrdinalComparer).Select(x => x.value)); } } } |
