From 901573473d0f1b2e6b852ba6f92110b9d7bb2c0f Mon Sep 17 00:00:00 2001 From: gnattu Date: Wed, 18 Sep 2024 21:22:33 +0800 Subject: Sort by version name before resolution sorting (#12621) --- Emby.Naming/Video/VideoListResolver.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Emby.Naming') diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs index 51f29cf08..12bc22a6a 100644 --- a/Emby.Naming/Video/VideoListResolver.cs +++ b/Emby.Naming/Video/VideoListResolver.cs @@ -141,7 +141,9 @@ namespace Emby.Naming.Video { if (group.Key) { - videos.InsertRange(0, group.OrderByDescending(x => x.Files[0].FileNameWithoutExtension.ToString(), new AlphanumericComparator())); + videos.InsertRange(0, group + .OrderByDescending(x => ResolutionRegex().Match(x.Files[0].FileNameWithoutExtension.ToString()).Value, new AlphanumericComparator()) + .ThenBy(x => x.Files[0].FileNameWithoutExtension.ToString(), new AlphanumericComparator())); } else { -- cgit v1.2.3