diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-04-24 19:00:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-24 19:00:19 +0200 |
| commit | a183fce142a47db3b2b9faa1e0f2863f0d56e5a1 (patch) | |
| tree | 8637cf347d573917242a3c5546baee33028825a3 /Emby.Server.Implementations/Sorting | |
| parent | d1f242bc097b1530de27d5e74f303ff06096c294 (diff) | |
| parent | b1e2419c6593a3aa4c8df3778831a3214ae5a1c0 (diff) | |
Merge branch 'master' into Preservation-of-Watched-Status-on-Re-watch
Diffstat (limited to 'Emby.Server.Implementations/Sorting')
| -rw-r--r-- | Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Sorting/StudioComparer.cs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs index 789af01cc3..c0e453d63d 100644 --- a/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs @@ -41,8 +41,8 @@ public class OfficialRatingComparer : IBaseItemComparer ArgumentNullException.ThrowIfNull(y); var zeroRating = new ParentalRatingScore(0, 0); - var ratingX = string.IsNullOrEmpty(x.OfficialRating) ? zeroRating : _localizationManager.GetRatingScore(x.OfficialRating) ?? zeroRating; - var ratingY = string.IsNullOrEmpty(y.OfficialRating) ? zeroRating : _localizationManager.GetRatingScore(y.OfficialRating) ?? zeroRating; + var ratingX = string.IsNullOrEmpty(x.OfficialRating) ? zeroRating : _localizationManager.GetRatingScore(x.OfficialRating, x.GetPreferredMetadataCountryCode()) ?? zeroRating; + var ratingY = string.IsNullOrEmpty(y.OfficialRating) ? zeroRating : _localizationManager.GetRatingScore(y.OfficialRating, y.GetPreferredMetadataCountryCode()) ?? zeroRating; var scoreCompare = ratingX.Score.CompareTo(ratingY.Score); if (scoreCompare is 0) { diff --git a/Emby.Server.Implementations/Sorting/StudioComparer.cs b/Emby.Server.Implementations/Sorting/StudioComparer.cs index 0edffb783b..6d041cf112 100644 --- a/Emby.Server.Implementations/Sorting/StudioComparer.cs +++ b/Emby.Server.Implementations/Sorting/StudioComparer.cs @@ -1,11 +1,11 @@ #pragma warning disable CS1591 using System; +using System.Globalization; using Jellyfin.Data.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; -using MediaBrowser.Model.Querying; namespace Emby.Server.Implementations.Sorting { @@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Sorting ArgumentNullException.ThrowIfNull(x); ArgumentNullException.ThrowIfNull(y); - return AlphanumericComparator.CompareValues(x.Studios.FirstOrDefault(), y.Studios.FirstOrDefault()); + return CultureInfo.InvariantCulture.CompareInfo.Compare(x.Studios.FirstOrDefault(), y.Studios.FirstOrDefault(), CompareOptions.NumericOrdering); } } } |
