diff options
| author | theguymadmax <171496228+theguymadmax@users.noreply.github.com> | 2025-12-28 07:22:28 -0500 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2025-12-28 07:22:28 -0500 |
| commit | 928a8458dd62007abc0082f478432608e9153f6e (patch) | |
| tree | e3db84bde8ad84a2e20cff8d1fd0e3270b725f9d /MediaBrowser.Controller | |
| parent | 43797fee426dc84ed8093209f76652698d67b3aa (diff) | |
Backport pull request #15786 from jellyfin/release-10.11.z
Fix parental rating filtering with sub-scores
Original-merge: 5804d6840c0276d3aef81bfec6af82e496672f01
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 3c46d53e5..d9d2d0e3a 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1620,12 +1620,17 @@ namespace MediaBrowser.Controller.Entities return isAllowed; } - if (maxAllowedSubRating is not null) + if (!maxAllowedRating.HasValue) { - return (ratingScore.SubScore ?? 0) <= maxAllowedSubRating && ratingScore.Score <= maxAllowedRating.Value; + return true; + } + + if (ratingScore.Score != maxAllowedRating.Value) + { + return ratingScore.Score < maxAllowedRating.Value; } - return !maxAllowedRating.HasValue || ratingScore.Score <= maxAllowedRating.Value; + return !maxAllowedSubRating.HasValue || (ratingScore.SubScore ?? 0) <= maxAllowedSubRating.Value; } public ParentalRatingScore GetParentalRatingScore() |
